Xcode 6.3 and Swift 1.1 [duplicate]

丶灬走出姿态 提交于 2020-01-04 05:04:18

问题


Is there any way to have Xcode 6.3 compile Swift using version 1.1? I upgraded to Xcode 6.3 today, expecting great bugfixes and being able to convert 1.1 code to 1.2. Unfortunately, rainbows and unicorns are nowhere to be found.

Now I have a broken project and I want to just revert back to compiling using Swift 1.1.

Eclipse would allow you to compile against another version of Java. Is this possible in Xcode and Swift?


回答1:


Unfortunately, no. There's no way to compile against an older version using a newer version of Xcode of pretty much anything except for older iOS versions in this ecosystem. That said, I believe this is on purpose. It's a good idea to keep up to date with the latest versions of everything.

One possible solution however is to go to https://developer.apple.com/downloads/index.action and download Xcode 6.2 and remove Xcode 6.3. This should install the tools for Swift 1.1 and remove the tools for 1.2. But again, it's a good idea to just revise your code to reflect the changes in Swift 1.2.




回答2:


You can install XCode 6.2 to a different folder and use both Versions. You just have to be carefull to start the right version everytime. In the preferences you can also set the Version of the Tools you want to use. You could use the Dev Tools from 6.3 with XCode 6.2 for example.

Reverting the CODE is possible if you have used git or svn.



来源:https://stackoverflow.com/questions/29568309/xcode-6-3-and-swift-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!