iOS9 UIWindow rootViewController

在iOS9中App被其他应用唤起的时候Crash,正常启动或者调试模式都不会Crash.

通过XCode - Window -Device,查看设备的log,如下

Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:]

发现

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

里面的提示框使用新的window,没有rootViewController,添加个透明的UIViewController问题得到解决

 

初步判断原因为启动过程中对所有window要求有rootViewController,启动后无要求。

 

 

 
posted @ 2015-11-21 00:05  geweb  阅读(1604)  评论(0编辑  收藏  举报