15

I want to use a playground in Xcode 6.0.1. So File -> New -> Playground

I get immediately the error. Playground execution terminated because the playground process exited unexpectedly. See image. Restart Xcode didn't helped.

Whats wrong with Xcode?Xcode Error

11 Answers 11

29

New Answer:

As @Woomin points out in the comments, first try restarting Xcode and rebooting your Mac, and if that fails try the following:

Try deleting the .simruntime files:

enter image description here

I found them located here in my root directory:

enter image description here

Old Answer:

If the above doesn't work try removing everything in the Developer folder located at /Library/Developer/. If this still doesn't work try removing everything in ~/Library/Developer/. If this still doesn't solve it remove xcode with AppCleaner and reinstall it using the MAS version. I found that doing this last thing solved the issue but it came back when I installed the simulators from xcode's download tab. Removing the .simruntime files finally solved it for me. BTW, I'm using version 7.2.

12
  • Usually restarting XCode works, and if that won't do I restart my Mac. This is obviously the way when both fail.
    – funct7
    Jan 7, 2016 at 2:05
  • @WoominJoshPark Good point. Try the simple restart option first and then if that fails this is the way to solve it. I'll add your point to my answer. Thanx.
    – SmileBot
    Jan 7, 2016 at 17:52
  • I also have the issue, but my CoreSimulator folder only has a Devices folder in it, hence I can't delete any .simruntime files. Restarting Xcode and my mac didn't solve the problem either. As I have many archives from apps submitted to the AppStore in my Developer folder, I don't want to delete it entirely. Any idea? Jan 16, 2016 at 8:04
  • 2
    Xcode 7.2 (7C68), OS X 10.10.5: I noticed this problem started happening after I downloaded the iOS 9.1 simulator from within Xcode. I have confirmed that if I just move that simulator out of the way (I just moved it to Desktop), the playground works fine. Move it back, and I get the error.
    – mbeaty
    Jan 26, 2016 at 4:27
  • 1
    @mbeaty I just removed all of the ones I show in the screenshot above and that solved the problem for me. You have to experiment. Try just removing the 9.1 version and see if that clears the issue up. If not remove the rest and that should do it.
    – SmileBot
    Jan 28, 2016 at 14:06
8

A restart of the mac solves the problem. What causes the issue is still unknown.

4
  • 2
    I am having this issue with XCode 7 Beta 4. Restarting the mac and reinstalling XCode beta did not help .. Aug 6, 2015 at 17:59
  • After downloading XCode 7 Beta 5 (Pre-Release), this issue doesn't appear anymore. Aug 7, 2015 at 8:28
  • Having the issue right now with Xcode 7 Beta 5 :( Restarting the computer didn't help. Aug 21, 2015 at 1:41
  • Having the same problem with Xcode 7.1 and El Capitan. I restarted Mac and Xcode and the problem still persisted.
    – Kent Bull
    Nov 7, 2015 at 17:17
3

Thanks smileBot's answer. I am able to make it work with 7.2 too. I did try differently.

I installed Xcode 7.2 release version via downloading. However it had problem mentioned above. I first deleted the Xcode 7.2 via AppCleaner completely. Empty the trash. Also cleaned the derived data using WatchDog for Xcode And then restart the machine. Try again, it did not work.

So I went ahead deleted the folder ~/Library/Developer/ and then restart, try again, I can use Playground again in Xcode 7.2 again.

2
  • Note the second time I didn't delete the XCode 7.2, I just deleted the ~/Library/Developer/ folder
    – Zhao
    Dec 13, 2015 at 23:06
  • This worked for me. Also after deleting ~/Developer I restarted my mac (thought I was using Windows 95 for a sec there)
    – Nate Flink
    Feb 12, 2016 at 2:45
1

Xcode 7.2 and Mac os x 10.11.2 Restart Xcode or mac does not worked for me. I solve this problem is that delete the Simulator Profiles. The Path is ~/Library/Developer/CoreSimulator/Profiles/Runtimes. Delete all Runtimes. Than Restart the Xcode, problem has been solved.

0

Install Command line tools using command

xcode-select --install

then u will get an update in Appstore install that app Problem will be solved.

0

OSX 10.11.2 and Xcode 7.2

I had gotten a reply to his from a member on the Apple Developer Forum and wanted to provide some additional information on my fix for this. First I deleted the ~/Library/Developer folder as indicated. Looking into it it had the some Simulator Profiles. I didn't know what that had to do with the Playground issue so I did NOT empty the Trash. I rebooted and the playground worked.

I put back the folder and the playground had the issues again. I one by one removed the simulator profiles in the sub directory ultimately removing ALL of the profiles without deleting the ~/Library/Developer folder structure and the Playground works.

0
0

With Xcode 7.2 (7C68) i had the same problem. I'd solve it by changing the entry of the runtime value from com.apple.CoreSimulator.SimRuntime.iOS-9-1 to com.apple.CoreSimulator.SimRuntime.iOS-9-2. I'd changed it in the device.plist. In ~/Library/Developer/CoreSimulator/XCPGDevices/ is one or more folder with a UUID as name. In one of this folders is the current device.plist.enter image description here

0

It's not necessary to delete manually Developer's folder. Just follow this steps in Command Line (CL).

Quit Xcode.app, Simulator.app and all Xcode related and then in CL:

 sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

 rm -rf ~/Library/*/CoreSimulator
2
  • In my case, I also deleted a theme folder which I have installed through Alcatraz, it was in /Library/Developer/Xcode/ now it's in UserData. But it was a nasty Xcode bug. I did a lot of stuff, I hope this works >.< Feb 8, 2016 at 19:47
  • uninstalled Xcode, delete developer folder and did a clean install it still didnt work Feb 8, 2016 at 21:35
0

A restart of Xcode solves the problem , most of the times . (Do remember to quit from the dock too)

If that doesn't work a restart of Mac is all that is required

0

This happened to me and I found that the platform setting wasn't set for my playground. Probably because the playground was created in a previous version of XCode which didn't require it.

Solution:

Double click on your playground to open it in XCode and wait for the fail message. Dismiss the message (it may appear more than once) and do the following

1.Select to show the project navigator pane.

enter image description here

2.Select the workspace in the navigator.

enter image description here

3.Select to show the Utilities pane.

enter image description here

4.In the playground settings area of the Identity inspector. Select OSX (or iOS)

enter image description here

-2

It is ok when Change the platform to "OS X" from inspector, but problem when back to "iOS". I don't know why...in Xcode7 Beta.

Plus, it is ok in my Xcode 6.4 for both platform when playground.

And there is one more option for iOS platform "Run in Full Simulator",besides "Render Documentation"option. in My Xcode 6.4 inspector

and I have check the "IDEPlaygroundSettings.inspector" in

/Applications/Xcode.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector

and

/Applications/Xcode-Beta.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector

they are quite different.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.