ios – 编译ReactiveCocoa时出错

我只是pod为这个新项目安装了这个Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios,'7.0'

def import_pods
    pod 'Mantle'
    pod 'LBBlurredImage'
    pod 'TSMessages'
    pod 'ReactiveCocoa'
end

target 'WeatherJoy2' do
    import_pods
    link_with 'WeatherJoy2'
end

pod安装成功但现在在构建项目时遇到以下错误

/Users/ankit/Documents/WeatherJoy2/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.m:49:3: UnkNown type name 'rac_propertyAttributes'; did you mean 'mtl_propertyAttributes'?
/Users/ankit/Documents/WeatherJoy2/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.m:49:40: Implicit declaration of function 'rac_copyPropertyAttributes' is invalid in C99

/Users/ankit/Documents/WeatherJoy2/Pods/ReactiveCocoa/ReactiveCocoa/NSObject+RACKVOWrapper.m:49:27: Incompatible integer to pointer conversion initializing 'mtl_propertyAttributes *' with an expression of type 'int'

项目中没有别的东西,这是一个新项目.我在xcode 6.2和OSX 10.9.5上

解决方法

当我一起使用Mantle和ReactiveCocoa时,我遇到了同样的问题.它似乎是由两个具有EXTRuntimeExtensions.h标头的pod引起的,这使得ReactiveCocoa导入标头的不兼容的Mantle版本(使用mtl_ vs rac_函数名称前缀).

在我的情况下,我通过用#import“../Objective-C/extobjc/EXTRuntimeExtensions.h”替换ReactiveCocoa pod中每次出现的#import“EXTRuntimeExtensions.h”来修复它.

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...