After upgrading to Xcode 7.0, I convert all project to Swift 2.0. But I can't update Carthage libraries. I get this warning:
Failed to load plugin at: /Users/Alexandr/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CocoaPodUI.xcplugin, skipping. Reason for failure: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
And several errors:
Box/Box.swift:6:37: error: 'Printable' has been renamed to 'CustomStringConvertible' /Box/Box.swift:31:10: error: 'toString' has been renamed to 'String' Box/MutableBox.swift:8:51: error: 'Printable' has been renamed to 'CustomStringConvertible' Box/MutableBox.swift:25:10: error: 'toString' has been renamed to 'String'
How can I use Swift 2.0 version of frameworks? My carthage file looks like:
github "Alamofire/Alamofire"
github "SwiftyJSON/SwiftyJSON"
github "ReactiveCocoa/ReactiveCocoa"
Add "swift 2.0" in the end of framwork didn't work.
~ xcodebuild -version
Xcode 7.0
Build version 7A220
~ carthage version
0.9.1
Seams Alamofire and SwiftyJSON already supports Swift 2.0. For ReactiveCocoa we need add branch "swift2".
github "Alamofire/Alamofire"
github "SwiftyJSON/SwiftyJSON"
github "ReactiveCocoa/ReactiveCocoa" "swift2"
First of all what Cartage version do you have? run the command
Carthage version
The latest stable i think is 0.8.0 and I suggest you to upgrade it if you have an older version. To do so run
brew upgrade carthage
After that check that all libraries you are using supports Swift 2.0, if not check different branches from master, maybe they did not merge them yet.
I just saw you run 0.9.1, maybe it has problem? I'm using 0.8.0 and works fine with Alamofire
Worked for me by putting the following in my Cartfile:
github "ReactiveCocoa/ReactiveCocoa" >= 4.0
Currently v4.x of ReactiveCocoa is in alpha but v3.x does not support Swift 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With