Xcode update and syntax changes

I have been learning Swift in Xcode for less than a year. I have followed a few different online courses and made numerous apps on my computer but have not yet released anything on the app store. One of the latest Xcode updates has really thrown me off my progress.


When I go into one of the apps I made before the update I am told required syntax has changed and I am guided through trying to convert my apps to the new syntax. Much of what Xcode is recomending I change the sytax to stops my app from running. Can anybody give me any advice on what to do to successfully convert my apps or is there a way to avoid need to convert them and allowing them to run on the previous syntax? Any advice will be appreciated.

It seems like you’re being bitten by the changes between Swift 1.2 (Xcode 6.4) and Swift 2.0 (Xcode 7.0). The Swift migrator (Edit > Convert > To Latest Swift Syntax) will do a reasonable job of converting Swift 1.2 to 2.0, but it’s not perfect; you will have to manually correct some issues.

… is there a way to avoid need to convert them and allowing them to run on the previous syntax?

For the moment you can continue using Xcode 6.4 on OS X 10.10.x. Alas, Xcode 6.4 does not work well on OS X 10.11, so I can’t recommend that.

In the long term you really are going to want to make the move to Swift 2.0. It’s well worth the effort IMO. A good place to start is WWDC 2015 Session 106 What’s New in Swift. Or, if video isn’t your thing, a quick ’net search will turn up a bunch of good summaries of the changes.

Finally, if you have specific questions feel free to post them here.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Xcode update and syntax changes
 
 
Q