Search code examples
iosxcodecocoapodsswift3frp

ReactiveSwift not working with Xcode 8.1. Conversion to Swift 3 leads to >50 errors. Fixes?


I'm trying to get ReactiveSwift to work with Xcode 8.1. Xcode claims ReactiveSwift was written in an earlier Swift version than 3.0 (I thought it was updated to Swift 3!). Conversion to Swift 3 leads to >50 errors all in the ReactiveSwift swift files. Any ideas how to fix? I am using CocoaPods to add the ReactiveSwift framework. My pod file is....

Podfile

target 'MyTarget' do
use_frameworks!
pod 'ReactiveSwift', :git => 'https://github.com/ReactiveCocoa/ReactiveSwift.git'
end

Solution

  • OK I solved it! I updated Cocoapods from 1.0.1 to 1.2.0.beta.1. Followed the process suggested by @Rob and voila! no errors. After struggling with the major syntax changes in ReactiveCocoa 5.0 and sparse documentation (so far), I got the UI binding test to work using a label and textfield and ..... textField.reactive.continuousTextValues.observeValues { text in self.label.text = text as String!} .....Thanks to @Rob for his help and support!