网上比较常规的几个问题就不细说了。
什么HTTPS、bitcode、什么什么的。
记录几个自己又遇到了但是网上没有说的。
启动应用报错,
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(0x185f1cf5c 0x19ab0ff80 0x185f1ce2c 0x186e0bf3c 0x18b7146a4 0x18b711300 0x18fc637ec 0x18fc63b6c 0x185ed45a4 0x185ed4038 0x185ed1d38 0x185e00dc0 0x18b4e00c8 0x18b4daf60 0x1001d2b24 0x19b33a8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
Application windows are expected to have a root view controller at the end of application launch
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window makeKeyAndVisible];
之后直接加入代码
UIViewController* vc = [[UIViewController alloc] initWithNibName:nil bundle:nil];
self.window.rootViewController = vc;
临时设置一个root,在之后重新对root赋值!
didFinishLaunchingWithOptions 的时候
self.window.rootViewController = [[UIViewController alloc] init]; 这样一下,然后再添加上述代码,然后再这个方法最后使用
[self.window addSubview:_welcomeViewContraller.view];
解决了这个问题。可能我的这个和正常的有些不一样,仅供参考。