Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile Swift on 10.9?

Tags:

swift

xcode6

Until this afternoon, when I downloaded the final Xcode 6, I was able to play around with Swift on my 10.9 machine. Now I get this error:

OS X targets using Swift cannot be built against an SDK older than 10.10, but the effective SDK is 10.9.

I had saved my copy of Xcode 6B7, but now opening the project in that version also causes the same error.

Anyone have a fix? I do not want to install 10.10 on this machine.

like image 303
Maury Markowitz Avatar asked Sep 11 '14 02:09

Maury Markowitz


1 Answers

Xcode 6.0 is only going to support using Swift with iOS. Using Swift with Mac OS X is not supported in this version of Xcode, and you will need to get Xcode 6.1 beta for that. Previous betas of Xcode 6.0 has support of Swift for OS X, but that was because Xcode 6.1 beta wasn't out at that time.

From the Xcode 6.0 release notes:

Swift Support for OS X

*A future version of Xcode to be released along with OS X Yosemite will add Swift support for OS X, including playgrounds and REPL. Xcode 6.0 only supports Swift for iOS projects and playgrounds. A beta release of Xcode with Swift support for both OS X and iOS is available at developer.apple.com/xcode/downloads/

like image 182
user102008 Avatar answered Oct 01 '22 15:10

user102008