I am updating one of my application that uses URL Scheme. I used to have application:handleOpenURL method in appdelegate.m with following code that used to work fine from long time (without Storyboards)
urlOpenedMsg2 *nextview=[[urlOpenedMsg2 alloc] initWithNibName:@"urlOpenedMsg2" bundle:Nil];
[self.navigationController pushViewController:nextview animated:YES];
Now I have updated my app with REFrostedViewController Sliding Menu and Story-boards. In hadleOpenURL method , I am just trying to open new screen "urlOpenedMsg2ViewController" and I can't open it.
I am using following code now
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
urlOpenedMsg2ViewController *nextview = [storyboard instantiateViewControllerWithIdentifier:@"urlOpenedMsg2"];
[(UINavigationController*)self.window.rootViewController pushViewController:nextview animated:NO];
Now my navigationViewController is not self.window.rootViewController so following line doesn't work and it opens home screen instead of urlOpenedMsg2 Screen
[(UINavigationController*)self.window.rootViewController pushViewController:nextview animated:NO];
Now I have RootViewController , NavigationViewController and MenuTableViewController for REFrostedViewController and RootViewController is initial view controller. Please see attached screenshot.
I don't know how to fix it.
How can I open "urlOpenedMsg2ViewController" screen from appdelegate.m handleOpenURL method ?
Thanks in advance.