Swift 1.2 compilation in Xcode 7 beta

Hello,


Eager to code my next project in Swift 2.0, but some of third-party Swift frameworks are not yet updated (for example, SwiftyJSON). They are compiled using Carthage separately into their own frameworks, however, there seems to be no way to tell LLVM/xcbuild to compile them as Swift 1.2. Is there a hidden cmdline argument we can use to hint it into compiling the source as 1.2, or it plain cannot understand anything but Swift 2.0? The latter would mean we'll have to wait until all third party libs are updated for 2.0 syntax, which could take years...


Thanks in advance!

The swift runtime is currently still being compiled into each application, so even if you could compile the older 1.2 framework code separately it wouldn't work properly with any app compiled with the 2.0 runtime included.


It is possible to have multiple versions of XCode installed at the same time; they each use their own packaged tools, and there is a setting in preferences to choose which XCode versions's tools to use from the command line.


You probably won't need to wait years though, for 2.0 compatible frameworks/pods/whatevers. You may need to do some research to see which have been updated so far in the last two weeks, and then update the settings for those 3rd party projects to get different branches, at least until Xcode 7 and Swift 2 are out of beta.


And if you're using a 3rd party framework that hasn't already been updated to the 2.0 syntax, you could give it a try yourself. It's often just tedious rather than difficult, correcting many of the same minor issues (functions that have migrated to methods, let instead of var, handling String counts differently, etc...).

Swift 1.2 compilation in Xcode 7 beta
 
 
Q