Reputation: 720
I am trying TwitPic to post Image with Text over Twitter using GSTwitPicEngine class, which use YAJLiOS,
So i add YAJLiOS framework in my project and, i am getting this('assign' and 'weak' are mutually exclusive) error in the file "YAJLParser.h" that is in YAJLiOS framework. showing Error in the following line-
@property (assign, nonatomic) __weak id <YAJLParserDelegate> delegate;
When i remove the __weak it becomes Apple Mach-O Linker (Id) Error.
Please help.How to handle this kinda errors.I am not getting the reason.
Upvotes: 3
Views: 2642
Reputation: 19
Probably you figured it out by now, anyways here is how I got rid of this error:
@property (assign) __unsafe_unretained id<YAJLParserDelegate> delegate;
Make sure all other declarations of delegate
in your .h code (if any) are __unsafe_unretained
e.g. in @private
section:
__unsafe_unretained id<YAJLParserDelegate> delegate;
Upvotes: 1
Reputation: 749
silly me ...
try
@property (unsafe_unretained, nonatomic) id <YAJLParserDelegate> delegate;
Upvotes: 1
Reputation: 749
As you probably already know, assign and weak are NOT the same thing ... functionally they're very close, but weak is much more sophisticated and rather cleverly nulls out references to disposed objects to avoid crashes ( amongst other things vis retain cycles ).
Regardless - what to do? My best guess is to try pulling out ARC's backward compatibility legacy fix ... replace _weak with _unsafe_unretained and see how that goes.
Upvotes: 0