我只是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 install成功但现在在构建项目时遇到以下错误:
/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
上答案 0 :(得分:3)
在将Mantle和ReactiveCocoa一起使用时,我遇到了同样的问题。它似乎是由两个具有EXTRuntimeExtensions.h
标头的pod引起的,这使得ReactiveCocoa导入标头的不兼容的Mantle版本(使用mtl_
vs rac_
函数名称前缀。)
在我的情况下,我通过用#import "EXTRuntimeExtensions.h"
#import "../Objective-C/extobjc/EXTRuntimeExtensions.h"
来修复它