Getting error compiling ReactiveCocoa

927 views Asked by At

I just pod installed this Podfile for a new project:

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 succeeeded but now getting the following errors on building the project:

/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'

There is nothing else in the project, it was a new project. I'm on xcode 6.2 and OSX 10.9.5

2

There are 2 answers

4
Iain Wilson On BEST ANSWER

I had the same issue when using Mantle and ReactiveCocoa together. It appears to be caused by both pods having an EXTRuntimeExtensions.h header, which made ReactiveCocoa import the incompatible Mantle version of the header (with mtl_ vs rac_ function name prefixes).

In my case I fixed it by replacing each occurrence of #import "EXTRuntimeExtensions.h" in the ReactiveCocoa pod with #import "../Objective-C/extobjc/EXTRuntimeExtensions.h"

0
Denis On

As an option you can set ReactiveCocoa version less then 3.0.0. For example, version 2.5 is normally working with Mantle.

pod 'Mantle', "~> 2.0.2"
pod 'ReactiveCocoa', "~> 2.5"