ios - perform segue from didReceiveRemoteNotification in appDelegate -


edit: before o further should have found solutions im trying if im using navagiation controller based app, thats not case here.

ive create push notifications have job, have logged , recieved push, clicked push notification , recieved correct logs.

my goal, want perform segue specific view controllers depending on job there going to.

- (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo {     nsstring *job = [[userinfo valueforkey:@"aps"] valueforkey:@"job"];      if([job isequaltostring: @"msg"]) {         nslog(@"going message");     }     if ([job isequaltostring: @"friend"]) {         nslog(@"going friend request");     }     if ([job isequaltostring: @"inv"]) {         nslog(@"going invite notifications");     }     if ([job isequaltostring: @"find"]) {         nslog(@"going find notifications");     } } 

  if([job isequaltostring: @"msg"]) {     nslog(@"going message");     uistoryboard* storyboard = [uistoryboard storyboardwithname:@"mainstoryboard" bundle:nil];     uiviewcontroller* detailvc = [storyboard instantiateviewcontrollerwithidentifier:@"msg"];     [self.window.rootviewcontroller presentviewcontroller:detailvc animated:yes completion:nil];  }  

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -