We’re well into the betas of Xcode 8 which will contain the final release of Swift 3, hopefully set for release around the first couple weeks of September. With this next release of Xcode, we’re encouraged to our Swift syntax to Swift 3 from 2.2 but – and this is unique to this Xcode release so far – we’re not quite required to do so.

There’s a single build setting that will let you continue your Swift with a Swift version that’s mostly similar in syntax to your existing from Xcode 7: Use Legacy Swift Language Version

Just drop into your project’s build settings and search for legacy swift to find the correct build setting, then switch the setting to YES to opt-in to Swift 2.3 rather than Swift 3 in Xcode 8.

Using Swift 2.3 in Xcode 8 - legacy swift - Using Swift 2.3 in Xcode 8

Use Legacy Swift Language Version in Xcode 8

Swift 2.3

The changes in Swift 2.3 should end up being minor items such as nullability changes in core Objective-C libraries which will make moving your code from Xcode 7.3 to 8 pretty easy.

You’ll be able to get the benefits in Xcode 8 without having to move to Swift 3. These are improvements such as the Memory Debugger, Editor Extensions and my personal : less unintentional changes to xib and Storyboard files!

If you’d like to read up on more of the changes you’ll be seeing when you convert your code to Swift 3, you can check out our [Swift 3 migration tips post]().

Questions or comments? Find us on twitter or submit an issue on github

Source link

No tags for this post.


Please enter your comment!
Please enter your name here