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

에러 코드

Xcode 7 iOS9에서 발생
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException'reason : 'Application windows are expected to have a root view controller at the end of application launch'


원인

Xcode 7부터 앱 시작전에 root view controller를 설정해 주어야 합니다.


해결

-  ( BOOL ) application : ( UIApplication  * ) Application  didFinishLaunchingWithOptions : ( NSDictionary * ) launchOptions {
    // 윈도우 초기화
    self . window  =  [[ UIWindow  alloc ]  initWithFrame : [ UIScreen  MainScreen ]  bounds ]];
    self . window . rootViewController  =  [ UIViewController  new ];
    [ self . window  makeKeyAndVisible ];

    return  YES ;
}