I created a new project in XCode.
File > New > Playground (option+shift+cmd+N)
I restarted my XCode and also rebooted my system, but still same error.
Swift Playgrounds is the best and easiest way to learn how to code. And with Swift Playgrounds 4, you have the tools to build iPhone and iPad apps right on iPad and submit them directly to App Store Connect, providing a new way for you to easily create apps and share them with the world.
Apparently, on the lower panel, there's a play and stop button there as per picture below.
Simply click the Run button at the bottom-right of the playground, and wait for execution to complete. Xcode now compiles your code, and shows you its result. The default code doesn't output anything to the Console, but you should be able to see the value of the variable str in the sidebar on the right of Xcode.
As your knowledge of Swift grows, you can begin learning SwiftUI, the framework you'll use to experiment with app building right on your iPad. Explore the tutorial Get Started with Apps on the More Playgrounds screen and try adding some of your own code to see what it does.
From the developer forums, this worked for me:
- Quit Xcode
- Delete the folder
/Users/<username>/Library/Developer/CoreSimulator/Devices
. For example, in Terminal:rm -rf ~/Library/Developer/CoreSimulator/Devices
- In Terminal:
killall -9 com.apple.CoreSimulator.CoreSimulatorService
(or just reboot).
Fox Xcode 7, I had to install iPad Air or iPad Air 2 for the playground to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With