Applications are expected to have a root view controller at the end of application launch

后端 未结 30 1829
野的像风
野的像风 2020-11-22 06:42

I get the following error in my console:

Applications are expected to have a root view controller at the end of application launch

30条回答
  •  不要未来只要你来
    2020-11-22 07:28

    Make sure you have this function in your application delegate.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions {
       return YES;
    }
    

    Make sure didFinishLaunchingWithOptions returns YES. If you happened to remove the 'return YES' line, this will cause the error. This error may be especially common with storyboard users.

提交回复
热议问题