iOS/tvOS playground fails with “Unable to find execution service for selected run destination”

后端 未结 6 873
盖世英雄少女心
盖世英雄少女心 2021-02-18 15:06

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

相关标签:
6条回答
  • 2021-02-18 15:33

    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
    
    0 讨论(0)
  • 2021-02-18 15:36

    Add all the simulators in xcode--> window-->devices.

    and restart the xcode it will works fine

    0 讨论(0)
  • 2021-02-18 15:47

    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".

    0 讨论(0)
  • 2021-02-18 15:49

    Ok, after some struggle, here's the solution.

    1. Clean up the folder ~/Library/Developer/CoreSimulator
    2. Restart the machine
    3. Try running an iOS Playground, it should work without problems now.

    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.

    0 讨论(0)
  • 2021-02-18 15:51

    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.

    0 讨论(0)
  • 2021-02-18 15:56

    Delete everything inside your DerivedData folder, ~/Library/Developer/Xcode/DerivedData, and then restart Xcode

    0 讨论(0)
提交回复
热议问题