Start a new topic

@synthesize of 'weak' property is only allowed in ARC or GC mode

@synthesize of 'weak' property is only allowed in ARC or GC mode

I'm using wikitude, xcode5 and phonegap for my mobile app project. I got this error when I try to build the project.

/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK/WTARViewController.m:19:1: @synthesize of 'weak' property is only allowed in ARC or GC mode


Seems to me that you're using a PhoneGap version which is too old for the WiktudePlugin. The Wikitude Plugin requires at least PhoneGap 2.8 and is tested with the latest version (3.3).

Which version of PhoneGap are you using?

Best regards

We have same problem with phonegap and wikitude, the error just like this


We are using phonegap2.9.1, wikitude SDK 3.2.1 and phonegap plugin 1.4.0 which are the latest version.
So, how can us fix this problem? Thanks.

So your PhoneGap project is not using ARC. Did you disabled it on purpose?
You can solve this issue by yourself, simply replace the following line (WTARViewController.h, line 26)

@property (nonatomic, weak) id<WTARViewControllerDelegate>      delegate; 

with this new one

@property (nonatomic, unsafe_unretained) id<WTARViewControllerDelegate>      delegate;

You could also update to PhoneGap 3.3, which doesn't have this issue (At least I'm not experiencing it).


Best regards


Thanks a lot! We finally fixed the problem by updating the phonegap version.
However, there is a new problem. We had try many ways that found in the internet, but still can't build successfully.
By the way, we are using iPhone 5s to build the app. 

We are very fresh student for making an app, so there is many problem with us.
Thanks for your helping.

Best Regards,

PhoneGap adds a force_load or load_all linker flag. You can remove this from the Xcode Build Settings. Simply search for OTHER_LDFLAGS or Other Linker Flags, and remove them.

Best Regards

We tackled the problem now.

Thanks for your help. 
Login or Signup to post a comment