Reprint Address: http://blog.sina.com.cn/s/blog_6784e6ea01017jfy.html
Latest corrections: This hint has little effect on compiling and running, and can not be set.
Action to generate this hint: Create a ios-application-empty application in xcode4.6 with a name of apptest empty project, and run the direct compilation
Error message: Although compiled through, can also run, but there is an error under the "Application windows is expected to a root view Controller" Cause: This error occurs on newer xcod.in the previous version of IOS5, when the application was loaded, a root view controller was required, and the version below IOS5 would have MainWindow as the boot file, iOS5 later versions did not. Need to manually create a root view controller Solution:① Create a class File-new File-object-c class, name Myviewcontroller, inherit from Uiviewcontroller② Add the attribute Viewcontroller in the TestAppDelegate.h code as follows:@property (Strong, nonatomic) myviewcontroller* Viewcontroller ③ initializes viewcontroller in TESTAPPDELEGATE.M and assigns values to RootviewcontrollerSelf.viewcontroller = [[Viewcontroller alloc] initwithnibname:@ "Myviewcontroller" bundle:nil];Self.window.rootViewController = Self.viewcontroller; It is no longer an error to compile and run again.