简体   繁体   English

iOS9更新后,应用程序崩溃,无法连接到Internet

[英]App Crashing After iOS9 Update, Won't Connect to Internet

Can anyone help me out here, my app is crashing in iOS9, it was fine 2 weeks ago. 任何人都可以在这里帮助我,我的应用在iOS9中崩溃,这在2周前还可以。 New to Objective-C, need help. 是Objective-C的新手,需要帮助。

When running the app in xCode I get this message 在xCode中运行应用程序时,出现此消息

Terminating app due to uncaught exception'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch' 由于未捕获的异常“ NSInternalInconsistencyException”而终止应用程序,原因:“应用程序窗口应在应用程序启动结束时具有根视图控制器”

Your app doesn't have a root view controller. 您的应用没有根视图控制器。 Select the View Controller in the storyboard which is your entry point. 在情节提要中选择View Controller,这是您的切入点。 Then in the Attributes Inspector check the box for Is Initial View Controller . 然后,在“属性检查器”中,选中“ Is Initial View Controller ”框。

OR 要么

in application didFinishLaunchingWithOptions method application didFinishLaunchingWithOptions方法中

UIViewController *vC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"viewControllerID"]; 

self.window.rootViewController = vC;
[self.window makeKeyAndVisible];

return YES;

If you are not using storyboards just instantiate the view controller with the init method. 如果不使用情节提要,只需使用init方法实例化视图控制器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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