intuit / CardParts

A reactive, card-based UI framework built on UIKit for iOS developers.
Other
2.52k stars 224 forks source link

Use of unresolved identifier 'BehaviorRelay #144

Closed thunpisit closed 5 years ago

thunpisit commented 5 years ago

Hi, I tried the quick start part. The import of CardParts and everything build fine except it giving me an error on these two which yelling: Use of unresolved identifier 'BehaviorRelay'

var title = BehaviorRelay(value: "")
var text = BehaviorRelay(value: "")

In Podfile I have !framework on so it shouldn't be any problem downloading the required frameworks for it. Just curious how to fix this error?

croossin commented 5 years ago

Can you try running pod install —repo-update? Reply back with which version of each framework it downloaded when that completes if it didn’t fix the issue.

thunpisit commented 5 years ago

I did it and still ran into the same problem, here's the framework version.

Updating local specs repositories

CocoaPods 1.7.0.rc.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.7.0.rc.1

Analyzing dependencies
Downloading dependencies
Using CardParts (2.10.0)
Using Differentiator (3.1.0)
Using Eureka (5.0.0)
Using FoldingCell (5.0.1)
Using RxCocoa (4.5.0)
Using RxDataSources (3.1.0)
Using RxGesture (2.2.0)
Using RxSwift (4.5.0)
Using SkyFloatingLabelTextField (3.7.0)
Using TransitionButton (0.5.2)
Using paper-onboarding (6.1.3)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 6 dependencies from the Podfile and 11 total pods installed.
croossin commented 5 years ago

Hmm. Which version of Xcode are you running? Swift version?

thunpisit commented 5 years ago

I'm running XCode 10.2.1 (10E1001) with Swift 5

croossin commented 5 years ago

@thunpisit Does the example project work for you on your machine?

AdrianBinDC commented 5 years ago

I've bumped into this issue with another project that utilizes BehaviorRelay. I tried it in Xcode 10.1 as well.

pancakeGeorge commented 5 years ago

I had the same issue. With the file that uses BehaviorRelay, import RxCocoa. That fixed my problem.

croossin commented 5 years ago

Great catch, @l0serking . Shall we include that in all of the examples on the README? Probably would make it more understandable, but crowd the examples as well. Thoughts? @thunpisit @AdrianBinDC

thunpisit commented 5 years ago

@croossin That actually works, and yes I would recommend adding import RxCocoa to the ReadMe because people that want to try the example code can actually run it. Thank you @l0serking for spotting it.

croossin commented 5 years ago

Sounds good to us. You can see the changes in PR #145 -- thanks again for the catch @l0serking !

lwdupont commented 5 years ago

Yes, thanks!!