Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when I try playground for Swift in Xcode 6 beta

Tags:

xcode

ios

swift

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. 
like image 324
user1270242 Avatar asked Jun 03 '14 06:06

user1270242


People also ask

Why is my Xcode playground not running?

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.

How do I run swift playground in Xcode?

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.

What is the difference between Swift playground and Xcode?

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.


2 Answers

I'm experiencing the same problem, but restarting xCode6-beta seems to solve it.

like image 118
Waruna Avatar answered Oct 14 '22 20:10

Waruna


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

like image 42
Gravity M Avatar answered Oct 14 '22 22:10

Gravity M