Downgrade xcode project from swift 3 to swift 2.2

I downloaded the new xCode 8 beta. When i opened my old project(in swift 2.2), i clicked the convert to new swift syntax, and i clicked swift 3. The problem is that i use a framework downloaded with carthage (Kanna). I have tried to use the:

carthage update

but it doesn't work.

When i try to run the code on the new Xcode-beta, i get this error:

Module file was created by an older version of the compiler; rebuild 'Kanna' and try again:

Answers


Seems like i am very late to answer but there is update available for 'Kanna' framework supporting swift 3.0. You can add this to your podfile if you use CocoaPods

use_frameworks!
pod 'Kanna', '~> 2.0.0'

Or for Carthage you can install like

github "tid-kijyun/Kanna" ~> 2.0.0

First of all save a backup of your current project. Now!

Solution 1

Open your project with Xcode 7.3.1, it uses Swift 2.2 so it will signal you a bunch of errors. Since you know Swift 2.2 you should be able to fix the errors and make you project again compatible with Swift 2.2

Solution 2

In Xcode 8 beta you can choose the Swift versione (Swift 2.3 or Swift 3.0). Select Swift 2.3 (it's fully compatible with Swift 2.3 but does support the new iOS API). Then, again, fix the errors manually.

Solution 3

Open the library you are using and use Xcode 8 to upgrade that to Swift 3.0. This is a temporary solution until the developer of that library will provide the upgraded code


When you open your project with Xcode 8.0 for the first time, you will be prompted via the migration assistant to do a migration pass. The assistant can also be invoked manually from the menu

Edit -> Convert -> To Current Swift Syntax…

If you upgraded code e.g. 2.3 to 3.0 and now want downgrade to 2.3 you can use above. If any errors occur copy your code from last commit in your repository and it should work fine.


Need Your Help

Sqoop failing when run from oozie but not in command line

teradata sqoop oozie

Sqoop action is failing when run from oozie but when the same command is copy pasted in command line (edge node) it is perfectly executing fine. When run from oozie job id is triggered and then i am

Why the need for a negative margin top in this case

html css

Working on a project, did some standard inline block elements. To get the count display to the right area I had to put in a negative margin-top. I'm not sure why it wouldn't just position there on ...