intuit/CardParts

Use of unresolved identifier 'BehaviorRelay

thunpisit opened this issue · 11 comments

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?

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.

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.

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

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

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

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

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

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

@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.

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

Yes, thanks!!