最近想学习下ReactiveCocoa 尝试在项目中导入,使用cocospods的方法导入
使用cocosPods 导入方法
-
在pod file文件中
Screen Shot 2016-10-14 at 14.57.13.png 执行 pod install --verbose --no-repo-update 进行导入ReactiveCocoa
-
编译运行之后出现问题
-
错误是 RACmetamacros.h 文件找不到的错误
Screen Shot 2016-10-14 at 11.50.17.png
-
-
错误原因是因为 项目中同时使用CocoaPod导入ReactiveCocoa和Mantle三方库文件
Screen Shot 2016-10-14 at 14.50.19.png -
解决办法 在pod 'ReactiveCocoa' 添加:podspec => 'https://gist.githubusercontent.com/PaulTaykalo/04f8e2ee25b9d57f03455ccafd541b34/raw/e94f3bec7a9450ecd0f0cdc9b4899deb0b91d758/ReactiveCocoa.podspec.json'
Screen Shot 2016-10-14 at 15.07.36.png
意思是 ReactiveCocoa的metamacros.h重命名为RACmetamacros.h,在看ReactiveCocoa下的metamacros.h文件 在一次执行 pod install --verbose --no-repo-update
编译运行就会发现冲突解决了
pod 中的文件命令
use_frameworks!
pod 'ReactiveCocoa',:podspec => 'https://gist.githubusercontent.com/PaulTaykalo/04f8e2ee25b9d57f03455ccafd541b34/raw/e94f3bec7a9450ecd0f0cdc9b4899deb0b91d758/ReactiveCocoa.podspec.json'