AnthonyR AnthonyR - 1 month ago 17
Swift Question

Reactive Cocoa / Reactive Swift - Swift 3.0 missing methods

Since I updated

Reactive Cocoa (RAC 5)
for
Swift 3.0
which needs
Reactive Swift
to works, I don't find events methods like
textField.rac_textSignal
on a
UITextField
for example, or
cell.rac_prepareForReuseSignal
for a
UICollectionViewCell
.

I imported both frameworks, I think the problem is that they updated the frameworks and they changed the name of the methods. But I didn't find an updated documentation for
Swift 3.0
.

I install
Reactive Cocoa / Reactive Swift
as a
submodule
in my project, not from Carthage, maybe the problem is coming from there ?

(Like that : https://github.com/ReactiveCocoa/ReactiveCocoa#getting-started)

Can someone tell me how to solve this ?

Reactive Swift : https://github.com/ReactiveCocoa/ReactiveSwift

Only have :
rac_lifetime
.

Thanks.

Answer

Some parts of the Obj-C API have been divided in another framework : ReactiveObjC.

I needed to install this framework to access these methods.

Solution :

As stated in README (Objective-C and Swift section), those Objective-C API are splitted out to ReactiveObjC framework. You need to add https://github.com/ReactiveCocoa/ReactiveObjC as a submodule, link the framework, then import ReactiveObjC.

Please see the following discussion on the issue :

https://github.com/ReactiveCocoa/ReactiveCocoa/issues/3197