How to install ReactiveCocoa properly using CocoaPods?

有些话、适合烂在心里 提交于 2019-12-06 07:46:56

问题


I'm very new to ReactiveCocoa. I tried to install ReactiveCocoa a couple of days ago via CocoaPods. Here is my podFile:

platform :ios , '7.0'
pod 'ReactiveCocoa'

After using pod install I have the log file here:

Analyzing dependencies

Downloading dependencies

Using ReactiveCocoa (2.0)

Generating Pods project

Integrating client project

And then I open myproject.xworkspace and #import <ReactiveCocoa.h> to start using the framework. But the problem is I cannot get it worked

For example in my code I have this line: objc RACSignal *usernameSignal = self._usernameTextField.rac_textSignal; But when I run the project, it showed up this debug error

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextField rac_textSignal]: unrecognized selector sent to instance 0xb933a70'

I believed that I might do something wrong with the framework installation here. Anyone please help me out!

I'm using XCode5 and iOS7.0


回答1:


I figured out the issues. It's because CocoaPods doesn't add the flag -all_load in my project build setting. After setting it manually, it works like a charm. Hope this help everyone who experience the same issue like me



来源:https://stackoverflow.com/questions/19118913/how-to-install-reactivecocoa-properly-using-cocoapods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!