ReactiveCocoa2.5 build faild in Xcode Version 7.3 (7D175)

Created on 22 Mar 2016  路  24Comments  路  Source: ReactiveCocoa/ReactiveCocoa

Most helpful comment

If removing from your pch file is too painful, you can do this:

#if __has_feature(objc_arc)
#import <ReactiveCocoa/ReactiveCocoa.h>
#endif

All 24 comments

I am also seeking solutions

Do not put the pre-compiled headers can be

@iworkcloud how?

after upgraded to 7.3 i have the same problem .

I am also seeking solutions

Can I just replace all the __weak NSObject * to id to solve this ? Not sure about that, but that can make the problem pass the compilation.

@jjksam yes,it's worked,just delete __weak.

@undefined-zola tks , i get it

edit like this

if __has_feature(objc_arc)

  • (RACSignal *)rac_valuesForKeyPath:(NSString *)keyPath observer:(__weak NSObject *)observer;

else

  • (RACSignal *)rac_valuesForKeyPath:(NSString *)keyPath observer:(NSObject *)observer;

endif

delete the cocoapods location .h file which have __weak, it is a temporary solutions锛宼he best way is waiting 3rd party libraries update!

agree @kernel-lj ,the best way is waiting 3rd party libraries update, because not sure if it will cause memory leaks after replace all the __weak NSObject * or use other ways to stop the Xcode complain

@NagiYan thank you !

why i can't unlock NSObject+RACPropertySubscribing.h.

You can also avoid this by not importing ReactiveCocoa in your precompiled header.

If removing from your pch file is too painful, you can do this:

#if __has_feature(objc_arc)
#import <ReactiveCocoa/ReactiveCocoa.h>
#endif

@gcox GoodJob!

@gcox For me,the error still appears.

@wang9262 You may be importing ReactiveCocoa in another header that you're importing in your pch file...you could try wrapping all imports in your pch file with the #if __has_feature(objc_arc) check.

Please set 'Weak References in Manual Retain Release:YES'.

@gcox Thanks.
After we've done this

#if __has_feature(objc_arc)
#import <ReactiveCocoa/ReactiveCocoa.h>
#endif

Some files that use RAC throw some errors like "Expected a type".At last we use @class RACxxx which solved this problem. Guess that there are some files marked as -fno-objc-arc in our project which caused this problem.

@Vanson This work around is simple and efficient, thanks!

Closing this because there doesn't seem like there's any work to be done in RAC.

tl;dr: In Xcode 7.3, __weak causes errors in files compiled as -fno-objc-arc. Since RAC uses __weak, you cannot use it in those files without setting the Weak References in Manual Retain Release setting to YES. If you're using a .pch that imports RAC, you're more likely to see this error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andersio picture andersio  路  17Comments

szweier picture szweier  路  10Comments

NachoSoto picture NachoSoto  路  20Comments

RuiAAPeres picture RuiAAPeres  路  15Comments

trozware picture trozware  路  9Comments