PersonalSwiftPlaygrounds icon indicating copy to clipboard operation
PersonalSwiftPlaygrounds copied to clipboard

Which version of Xcode?

Open bo01ean opened this issue 10 years ago • 6 comments

With Xcode6 GM (6A313) I get "Playgrounds targeting OS X are not supported in this version of Xcode."

bo01ean avatar Sep 10 '14 21:09 bo01ean

Unfortunately, Apple split the Mac side of Swift development off into the beta of Xcode 6.1 yesterday. You need to get the Xcode 6.1 beta to be able to use Mac Swift playgrounds. Or stay on one of the previous Xcode 6.0 beta releases.

I believe you should be able to get these to work in the iOS-only Xcode 6 release candidate by pulling up the file inspector and switching the Platform from OS X to iOS. You'll probably need to change the couple of "import Cocoa" lines in there to "import UIKit" or "import Foundation", and you might need to change the references to NSColor in the SceneKitMac playground to UIColor.

BradLarson avatar Sep 10 '14 21:09 BradLarson

ok, thanks!

bo01ean avatar Sep 10 '14 23:09 bo01ean

FYI, I was able to edit the playground by saying Show package contents, then opening contents.xcplayground, then changing this line:

<playground version='3.0' sdk='macosx'>

to this

<playground version='3.0' sdk='iphonesimulator'>

Save, and then you can open it in Xcode.

calvincorreli avatar Sep 20 '14 15:09 calvincorreli

Cool workaround

asyncanup avatar Sep 20 '14 22:09 asyncanup

If you open contents.xcplayground with TextEdit it may change the quotes around 'iphonesimulator' to Smart Quotes and it will not open. Replacing Smarties with Dummies does the trick.

ghost avatar Sep 21 '14 18:09 ghost

OK, I updated all but the Scene Kit playground to be iOS playgrounds, since Xcode 6.1 might take a little while to get here. The Scene Kit one doesn't want to render when I port the colors, etc. across to UIKit, so I'm leaving that on the Mac for now.

BradLarson avatar Sep 29 '14 14:09 BradLarson