About XCODE7 compiling old project crashes-[uiapplication _runwithmainscene:transitioncontext:completion:]

Source: Internet
Author: User

Crash ReasonCrash Assertion failure in 
-[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-

(* * * * terminating app due to uncaught exception ' nsinternalinconsistencyexception ', ' Enter code here ' reason: ' Application W Indows is expected to has a root view controller at the end of application launch‘First throw call stack:)Try solution one:The code makes adjustments, joins the next loop cycle, runs the code again, and the program is normal. ******//
- (void) Applicationdidbecomeactive: (UIApplication *) Application {//Restart Any tasks this were paused (or not yet started) while the application is inactive.       If the application is previously in the background, optionally refresh the user interface. //crash in iOS9_testwindow =[[UIWindow alloc] Initwithframe:[uiscreen mainscreen].bounds]; _testwindow.hidden=NO; //OK//Dispatch_async (Dispatch_get_main_queue (), ^{//_testwindow = [[UIWindow alloc] Initwithframe:[uiscreen mainscreen].bounds]; //_testwindow.hidden = NO; //    });      }
OrTry solution two:Xcode7 need all windows must have a root controller XCODE 7 requires that all the Windows must has a rootviewcontroller you can take easy:
uiviewcontroller* VC = [[Uiviewcontroller alloc]initwithnibname:nil Bundle:nil];  
It's working good if you need the only UIWindow (for easy examples from any tutorials-before Xcode 7)!

About XCODE7 compiling old project crashes-[uiapplication _runwithmainscene:transitioncontext:completion:]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.