Search code examples
iosswiftreactive-cocoacarthage

Integrating ReactiveCocoa using carthage fails


I am trying to create a fresh iOS/Swift project and integrating ReactiveCocoa using carthage.

I am running Xcode 7.1.1.

My cartfile just has one line:

github "ReactiveCocoa/ReactiveCocoa"

When running carthage update, I am getting the following build errors:

The following build commands failed:

CompileSwift normal x86_64 Users/nburk/Developer/RxTicTacToe/Carthage/Checkouts/Result/Carthage/Checkouts/Box/Box/Box.swift

CompileSwift normal x86_64 /Users/nburk/Developer/RxTicTacToe/Carthage/Checkouts/Result/Carthage/Checkouts/Box/Box/MutableBox.swift

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler

(3 failures)

Then some more info:

/Users/nburk/Developer/RxTicTacToe/Carthage/Checkouts/Result/Carthage/Checkouts/Box/Box/Box.swift:6:37: error: 'Printable' has been renamed to 'CustomStringConvertible'

/Users/nburk/Developer/RxTicTacToe/Carthage/Checkouts/Result/Carthage/Checkouts/Box/Box/Box.swift:31:10: error: 'toString' has been renamed to 'String'

/Users/nburk/Developer/RxTicTacToe/Carthage/Checkouts/Result/Carthage/Checkouts/Box/Box/MutableBox.swift:8:51: error: 'Printable' has been renamed to 'CustomStringConvertible'

/Users/nburk/Developer/RxTicTacToe/Carthage/Checkouts/Result/Carthage/Checkouts/Box/Box/MutableBox.swift:25:10: error: 'toString' has been renamed to 'String' A shell task failed with exit code 65: ** BUILD FAILED **

Does anyone know how to fix this?


Solution

  • There's still no stable release of ReactiveCocoa 4, and since you're not specifying a version, it's downloading the last stable one: 3.0, which isn't compatible with Swift 2.x.

    What you want to do is add a specific version:.

    github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-RC.2"