Xcode 7, Swift 2.0, Carthage

After upgrading to Xcode 7.0 , I will convert the entire project to Swift 2.0 . But I cannot update the Carthage libraries. I get this warning:

Could not load plugin: / Users / Alexandr / Library / Application Support / Developer / Shared / Xcode / Plug -ins / CocoaPodUI.xcplugin, pass. Reason for failure: *** - [__ NSPlaceholderDictionary initWithObjects: forKeys: count:]: attempt to insert a null object from Objects [0]

And a few errors:

Box / Box.swift: 6: 37: error: 'Printable' was renamed to 'CustomStringConvertible' / Box / Box.swift: 31: 10: error: 'toString' has been renamed to 'String' Box / MutableBox.swift: 8: 51: error: 'Printable' was renamed to 'CustomStringConvertible' Box / MutableBox.swift: 25: 10: error: 'toString' was renamed to 'String'

How can I use Swift 2.0 frameworks? My carthage file looks like this:

 github "Alamofire/Alamofire" github "SwiftyJSON/SwiftyJSON" github "ReactiveCocoa/ReactiveCocoa" 

Add "swift 2.0" at the end of the framework does not work.

 ~ xcodebuild -version Xcode 7.0 Build version 7A220 ~ carthage version 0.9.1 

Edit:

Alamofire and SwiftyJSON already support Swift 2.0 . For ReactiveCocoa we need to add the "swift2" branch.

 github "Alamofire/Alamofire" github "SwiftyJSON/SwiftyJSON" github "ReactiveCocoa/ReactiveCocoa" "swift2" 
+5
source share
2 answers

First, what is your version of Cartage? run the command

 Carthage version 

The last stable one, I think 0.8.0, and I suggest you update it if you have an old version. To do this, run

 brew upgrade carthage 

After that, check that all the libraries used support Swift 2.0 , if you do not check different branches from master, they may not have merged them yet.

I just saw that you started 0.9.1, maybe the problem? I use 0.8.0 and work fine with Alamofire

+2
source

Worked for me by putting the following in my Cart File:

 github "ReactiveCocoa/ReactiveCocoa" >= 4.0 

V4.x ReactiveCocoa is currently in alpha, but v3.x does not support Swift 2

+1
source

All Articles