Xcode 7 – after update old project need a rootviewcontroller

If after update of Xcode you trying to compile an old project that always build without problem, and now you are getting this error “Application windows are expected to have a root view controller at the end of application launch”, probably your project have this inside the app delegate class:

[window addSubview:viewController.view];

If yes, you should replace it with:

[window setRootViewController:viewController];

This is it.

here is also the same question
http://stackoverflow.com/questions/30884896/application-windows-are-expected-to-have-a-root-view-controller-at-the-end-of-a