After migrating to XCode 7.1 I can not use playground with iOS and tvOS platforms. Only OS X works. Simplest playground code produces error message:
Una
I was able to resolve this issue with these two commands in the Terminal:
$ rm -rf ~/Library/Developer/CoreSimulator/Devices
$ killall -9 com.apple.CoreSimulator.CoreSimulatorService
Add all the simulators in xcode--> window-->devices.
and restart the xcode it will works fine
There may be a faster solution:
Check that you have iPad Pro simulator in your devices in Xcode. If not – add it via Add Simulator option.
As some have noted in comments, you may also need to restart Xcode or reopen the playground.
To add a simulator go to Devices (Window > Devices). Click the + button at the far bottom left of the window, click "Add Simulator", then select the appropriate "Device Type" from the dropdown and click "Create".
Ok, after some struggle, here's the solution.
~/Library/Developer/CoreSimulator
Note: In my case I renamed CoreSimulator
to CoreSimulator.old
, and after restart a new CoreSimulator
was auto-created (so, I just threw away the .old
one).
BTW, there is a file ~/Library/Developer/CoreSimulator/Devices/device_set.plist
with whole list of Simulators under /Root/DefaultDevices
. I think this is where the problem was coming from.
Xcode 8 update. Ran into a similar message
"selected platform is not available"
With the playground open, in the upper right of the window, the last icon on the right: Hide or Show the Utilities. Click that, then in that area click the icon on the left: Show File Inspector.
Then in the Playground Settings popup it may be set for unknown. Change it to your Platform of choice (OS X for me) then you should be good to go.
Delete everything inside your DerivedData folder, ~/Library/Developer/Xcode/DerivedData, and then restart Xcode