gerbil
gerbil

Reputation: 913

Error compiling with RxSwift

I'm trying to add RxSwift to my project. Added RxSwift and RxCocoa to my Podfile but when I compile I get this error:

error

Tried in another empty project and it all works fine. Can't find what's causing this.

EDIT:

Seems like it fails to build Rx-Cocoa. No idea why.

error

Upvotes: 0

Views: 625

Answers (2)

GOrozco58
GOrozco58

Reputation: 1192

Don't use self.text, That's wrong you can access the Base class you are extending through base property.

In this case base property is gonna be UITextField.

extension Reactive where Base: UITextField {

    public var textInput: TextInput<Base> {
        return TextInput(base: base, text: base.text)
    }
}

Upvotes: 1

Daniel Poulsen
Daniel Poulsen

Reputation: 1456

import Foundation
import RxSwift
import RxCocoa

//code insert here!!

Upvotes: 0

Related Questions