我有一个应用程序,其中任何人在回答问题时都会收到通知。所以当我收到通知并点击它时,我必须转到answerviewcontroller。 我正在使用下面的代码。但是应用程序崩溃显示“终止,因为没有系统应用程序”。手机重新启动时带有苹果标志。为什么???请帮忙终止,因为从推送通知启动时没有系统应用程序
-(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];
});
}
为什么使用'dispatch_async'块?尝试删除它 – iSashok