Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8858945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:56:30+00:00 2026-06-14T14:56:30+00:00

This a issue that have took me down since I am not able to

  • 0

This a issue that have took me down since I am not able to solve it although it seems so easy.
The fact is that I have an iOS app, mainly a webview that loads a website, and I need to load different wen page when notification is received. I am implementing push notification and I have managed to get them working. They are received by the app in the App Delegate and then is when the problem starts. I would like to launch the webview with a specific URL but I don’t know how to do it. I have tried to get the webview instance and passes the URL to it:

“SomeAppDelegate.h”

#import <UIKit/UIKit.h>
@class BrowserViewController;

@interface SomeAppDelegate : UIResponder <UIApplicationDelegate>
@property(nonatomic, retain) IBOutlet BrowserViewController *viewController;
@property (strong, nonatomic) UIWindow *window;
@end

“SomeAppDelegate.m”

#import "SomeAppDelegate.h"
#import "BrowserViewController.h"

@implementation SomeAppDelegate
@synthesize window = _window; 
@synthesize viewController;
.........


- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
[viewController.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20]];
[self.window addSubview:viewController.webView];
[self.window makeKeyAndVisible];

Another test was to create an instance method within BrowserViewContrller trying to reload from there. I also tried to load story board programatically but when “Is Initial View Controller” is unchecked in storyboard the app crashes just before launch.

I did a lot of googling but I don’t understand pretty much how this life cycle works. I will thank any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:56:31+00:00Added an answer on June 14, 2026 at 2:56 pm

    Probably, you should set your viewcontroller as AppDelegate’s window.rootViewController in the didFinishLaunching:withOptions: method of your app delegate instead of adding it’s webView as window subview – because webView is only loaded after UIViewController’s method viewDidLoad got called – that means that your webView might not be loaded when you’re trying to reload it with request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK so I have an xslt issue that I cannot seem to solve. This
I have an issue that seems like very flaky behavour, is this a problem
Heyy can somebody help me ? i have this issue that still do know
I have this issue with ComboBox that uses IEnumerable<Brush> as ItemsSource; the problem lies
I have never come across this issue but most recently I noticed that a
I am having this issue. I have a script that checks if variable exists,
I am having some problems figuring out this issue. I have a server that
I know that there are some threads have a similar issue with this thread.
I've been investigating this issue that only seems to get worse the more I
This is NOT a life or death issue. I do have a backup from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.