I am currently trying to receive the URL I threw in the push notification in AppDelegate and display it in WebView.
Also, this WebView is not only used for that purpose, but also for other situations.
More specifically, it's like a news app, and there are tabs, and each tab has a list of articles, and when you tap it, it goes to DetailViewController.I would like to use this DetailViewController as it is.
In another way, the UITabBarController has a UINavigationController that goes to FirstViewController - > DetailViewController.Can you tell me?
Let's get to the point.
I'm trying to skip the URL I received in the push notification (this is confirmed) directly from AppDelegate to the DetailViewController.
"The code is trying to transition to ""*Additional 3willFinishLaunchingWithOptions"" in AppDelegate.m, but it doesn't work as expected."
Does anyone have any idea of a moving cord?Thank you for your cooperation.
AppDelegate.m
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
FirstViewController* firstView= [storyboard instantiateViewControllerWithIdentifier:@"FirstView";
UINavigationController*navigationController= [[UINavigationController alloc] initWithRootViewController: firstView];
DetailViewController* detailView= [storyboard instantiateViewControllerWithIdentifier:@"DetailView";
detailView.URL = URL;
navigationController pushViewController: detailView animated: YES;
Additional 2
We use a service called Growth Push for push notifications.
Please refer to the following page for the implementation of the push notification itself.
http://growthhack.sirok.co.jp/growthpush/4371/
Additional 3
I changed the description location because if I wrote the code directly in willFinishLaunchingWithOptions, it would not be executed.Therefore, once you issue an alert view and select Yes, you are attempting to fly to the DetailViewController.
I solved myself.
All I had to do was pass the URL I received from AppDelegate to the FirstViewController and transition from it to the starting point.
Also, it was a misunderstanding that it was displayed in the modal view.Failed to put self.window.rootViewController in UINavigationController.When I turned it off, the modal view didn't work either.
© 2024 OneMinuteCode. All rights reserved.