简体   繁体   中英

Terminating since there is no system app when launching from push notification

I have an application in which the notification arrives when any one answers the question. So when i receive the notification and taps on it i have to take to the answerviewcontroller. I am using the following code for this. But the application crashes showing "Terminating since there is no system app.". The phone restarts with apple logo. why??? Please help

    -(void)pushdetailsViewController
{
    dispatch_async(dispatch_get_main_queue(), ^{
        UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
         QPYourQuestionController *controller = (QPYourQuestionController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"yourQuestion"];
      [[QPCommonClass initializeUserDefaults]setObject:[pushDictonary valueForKey:@"question_id"] forKey:@"currentquestionID"];
        NSLog(@"Dictionary %@",pushDictonary);

        UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
        [navigationController pushViewController:controller animated:YES];


    });
}

This won't answer your questions but might help people with the same issue. This is Apple bugs you can show here , Nobody can figure out the exact solution for that.

Solution 1: You're confusing SpringBoard and storyboards . Your storyboard is fine but you need to reboot your device (or Quit and restart the Simulator), as the SpringBoard (the process which handles the home screen) has died.

Solution 2: Please remove dispatch_async(dispatch_get_main_queue() statement and uninstall app & clean & build

Solution 3: That error message is just telling you that iOS stopped running. So obviously the app is no longer running and won't be able to again until the iPad finishes rebooting. As far as what causes the crash you need to do some more exploring. Definitely turn on exception breakpoints to see if you can catch the crash before the whole device crashes . Another thing to keep in mind is that the debugger, for whatever reason, will not work if you have distribution profiles installed. If you have an app with an included push profile, for example, it will always crash shortly after launch because the debugger takes it down with it.

Solution 4: What it worked for me was to delete the app in the iPhone simulator, force quit the simulator and hit run again in Xcode .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM