I encountered the following error when I create and open a playground for Swift, any solution for it?
Error running playground.
Failed to prepare for communication with playground.
Restarting Xcode and rebooting my macbook. Stopping the simulator via the Activity monitor and restarting it. Opening up new tabs in an attempt to refresh. Uninstalling and reinstalling Xcode via the app store.
In the Swift Playgrounds app on your Mac, click Run My Code (or use the Touch Bar). If there are instructions on the right side of the screen, they slide down when you click Run My Code, so you can watch your code run in the live view. When you click Stop, the instructions slide back up.
One of the biggest differences between Swift Playgrounds and Xcode Playgrounds is that Swift Playgrounds are much less powerful and are built more as an educational tool. My biggest fear is that as Apple brings Swift Playgrounds to the Mac that they will stop supporting and growing Xcode Playgrounds.
I'm experiencing the same problem, but restarting xCode6-beta seems to solve it.
For me the restarting XCode 6 did not solve the problem. So I restarted the Mac. It worked afterwards.
This tutorial was helpful: http://www.raywenderlich.com/74438/swift-tutorial-a-quick-start
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