Open bo01ean opened 10 years ago
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.
ok, thanks!
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.
Cool workaround
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.
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.
With Xcode6 GM (6A313) I get "Playgrounds targeting OS X are not supported in this version of Xcode."