Xcode 8 Beta - App Not Launching in Simulator

Version 8.0 beta (8S128d)


(PSA: before you run Xcode 8 make sure you BACKUP your projects. Xcode 8 changes Storyboard data versions. Once a Storyboard has been opened in Xcode 8, it cannot be opened Xcode 7!)


My universal app runs fine in Xcode 7, and is on the App Store.


I'm trying to run it in the 10.10 Simulator.


I've selected "iOS Simulators -> iPad Retina".


When I select "Run" from Xcode, it builds and tells me that it's running. The Simulator launches, shows the iPad home page, but nothing else. The interface is frozen.


In the Xcode 8 Beta Release Notes, it has this to say:

Booting an iOS 10.0 Simulator Device will result in a SpringBoard crash loop cycle.

Workaround: Use Simulator.app to boot the device. If that is not an option, you can stop the crash loop cycle by requesting that SpringBoard relaunch suspended:

simctl spawn booted launchctl debug system/com.apple.SpringBoard --start-suspended


So I performed this in Terminal:


xcrun simctl spawn booted launchctl debug system/com.apple.SpringBoard


Terminal spat out the following:


simctl[3860:60482] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (260.5).

2016-06-14 13:51:12.526 simctl[3860:60482] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.

No devices are booted.


Results: the iPad home page in the Simultor is still frozen. Pressing "Stop" in Xcode has no effect.


I've Restarted the machine. Rinsed, repeat, no good.


Any suggestions?


(At this point, there are so many problems with Xcode 8 and the 10.10 Simulators that I am forced to go back to Xcode 7 and 9.3 Simulators. I guess that's why they call it a beta...)


The release note was edited from what I wrote initially and is in error now. I'll get it corrected. The release note is supposed to be *specifically* about booting by using simctl.


The error message from simctl is because you did not xcode-select Xcode-beta.app before running that command.

This is the first report of such an issue. I'm not seeing anything like this. Please try again and take note of the following:


Do you see the app get installed in the device (ie, does it appear in SpringBoard)?

Do you see anything relevant in the device's system.log?


Take a sysdiagnose when in this state, and file a radar at http://bugreport.apple.com. Also include ~/Library/Logs/CoreSimualtor/*.log and ~/Library/Logs/CoreSimualtor/[Device UDID]/.


Report the radar number here, so I can find it quickly.

I have a similar problem. I get "(null) was unable to service the request."

I tried running "/Applications/Xcode-beta.app/Contents/Developer/usr/bin/simctl spawn booted launchctl debug system/com.apple.SpringBoard --start-suspended", after runing Simulator from Xcode > Open Developer Tool and still it won't bring up the springboard. Trying to Build & Run in Xcode results in "Device invalid state" message in Xcode.


I also tried "Reboot" option from Simulator > Hardware, with no avail.

Any suggestions?

I have a similar problem although the simulator just won't launched. Tried the workaround from the releases notes but didn't change much. Filed a report with a sysdiagnose and requested logs and as much info as I had, hopefully it can help : 26788509


Let me know if I can try anything on my end to help you fix the issue.

In the same boat :-/. Workaround didn't work for me either. On 10.12 if that matters.

10.12 also, I should have said that too in my comment.


What workaround changed, I think, is that instead of an Apple logo I get a spinner. But simulator still won't launch.

The simulator would not boot for me until I moved the Xcode-beta.app to the Applications folder.

Interesting, thanks for your feedback. I had moved it initially to Applications folder and only launched it from there I think, but there might be something around that !

Had done all of that already.

Xcode-beta is installed in /Application and rebooted and restarted and reset sim. No luck.

I'm also running it on macOS Sierra.

Problem solved for by an Apple Engineer in the lab. It's an issue they're working on. The bottom line was that when I copied Xcode to Applications folder, there was a bit set on it and that was preventing it from communicating with the simulator.


To fix it:

Copy-paste Xcode-beta.app from Applications folder to somewhere else, e.g. Documents folder.

Delete Xcode-beta.app from Applications folder.

Move Xcode-beta.app from Documents to Applications folder again.

Bingo ! Fixed it for me also.


I guess it's linked to the fact that they distributed it in a .zip file this year, maybe some attribute was stuck there, or it's linked to Sierra, who knows. I copied it (not move) twice and works as intended now.


Let me thank you for taking the time to share what you were told in the Lab with us, much appreciated !

Don't run the 'launchctl debug system/com.apple.SpringBoard --start-suspended' workaround if you're launching Simulator.app. That is *only* relevant to the 0.01% of developers that want to boot the simulated device from the command line using 'xcrun simctl boot'. That issue should not be impacting you, and your issue looks unrelated to this one. Please start a new thread instead.

Your issue is the installation issue whereby your install is getting AppTranslocated for some reason. Some have reported this if they run Xcode-beta.app right out of Downloads, but others have seen it even following our reccomended installation instructions. We're still investigating in order to provide an update to the release note, but this workaround seems to work for those that we've tried it with:


Copy Xcode-beta.app from /Applications to ~/Desktop using Finder

Delete /Applications/Xcode-beta.app

Copy Xcode-beta.app from ~/Desktop to /Applications using finder

Thanks for answering. Soheil mentionned this fix too earlier, and I can confirm it fixed it for me. I updated the bugreport yesterday with relevant details if that helps.


Regarding the instructions I indeed followed them, I used Safari to download the ZIP file (it may or may not have extracted it for me, I honestly can't recall), unzipped in place THEN moved to Applications/ before launching. Using macOS Sierra.

Yeah. I'm not sure why, but for some reason, even people that follow the instructions to the letter have been hit by this. Luckily, they usually get unhorked with the workaround above. Thanks for reporting. It is under active investigation and hopefully it should be less painful next time. Sorry about that.

Xcode 8 Beta - App Not Launching in Simulator
 
 
Q