I have a question about iOS Storyboard.
In my storyboard I have my flow:
I think what you can do is not check a valid session at all. Here is what I think
1) Create a
BOOL called isUserSignedIn that is initially set to
NO and save that in you NSUserDefaults. (AppDelegate
2) Once user makes a valid Login set the
3) When user logs out set
4) Everytime the user opens the app. In
didFinishLaunchingWithOptions check of the BOOL is yes or no. if no loads LoginViewController. if yes do nothing.
This is how I'd do it. Always save every BOOL changes in NSUserdefaults and loads from there.
SOLUTION 2 But if you want to load your DetailViewController in your AppDelegate use this code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions //check your login session here… //if session ok loads DetailViewController DetailViewController* detail = [[DetailViewController alloc] init]; [self.window.rootViewController presentViewController:detail animated:NO completion:nil]; //if not // do something.. return YES; }