Discussion Forums  >  Xcode, Errors, Installing, Configuring

Replies: 9    Views: 1469

shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
09/01/13 02:23 PM (12 years ago)

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

Hi, I'm trying to install this feature (https://www.cocoacontrols.com/controls/twsreleasenotesview) but I get the following error when I try to run my app in the simulator: https://www.dropbox.com/s/0zwht3naeq7glyc/Screen%20Shot%202013-09-01%20at%205.19.23%20PM.png Does anyone know how to fix this? Thanks, David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/13 02:58 PM (12 years ago)
The Simplest way is to find a project that doesn't use ARC. I've tried to make conversions between non-Arc (Buzztouch) and Arc code, and it hasn't been pretty. When you're good enough in code, those things will make more sense. But I'm not at that point yet, so I still struggle with ARC/Non ARC integration. You can try to replace 'weak' with blanks or some other type (strong, etc) but that's no guarantee. Cheers! -- Smug
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
09/01/13 03:11 PM (12 years ago)
Was looking around on Xcode and saw you could go to Edit>Refractor>Convert to Objective C ARC. I really have no idea what this does but could that be what it wants me to do? David
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/01/13 03:20 PM (12 years ago)
ARC is automatic reference counting, which is an automated way to release objects from memory when needed. Currently, Buzztouch is not using ARC. so combining ARC and non ARC code can sometimes be an additional challenge. These can help clear things up a bit... http://stackoverflow.com/questions/9859719/xcode-property-attributes-nonatomic-copy-strong-weak http://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property but if not, see my previous statement where I suggest finding a project that doesn't use ARC ;) Cheers! -- Smug
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
09/01/13 03:31 PM (12 years ago)
So...here is something that may help you: I believe the @synthesize property became optional when Xcode 4.5 came out. If you are using Xcode 4.5 and up, you may not need to synthesize things anymore. Can you post a download link to your code and we can look into it? Jake
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
09/01/13 03:34 PM (12 years ago)
Just PM'd you. Thanks, David
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
09/01/13 03:36 PM (12 years ago)
I replied. Jake
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
09/01/13 03:59 PM (12 years ago)
The code that I received does not include the Release Notes view. I did some research on the Release Notes View: It Requires ARC. At the moment, it will not work easily with the Buzztouch core. The Buzztouch Core Version 3.0 is coming soon (close to the release of iOS 7), and this may include ARC. Until then, I would recommend using a Custom HTML/Text Plugin to display a "Release Notes Screen" under the "Info" tab. Does this help? Jake
 
shak77
buzztouch Evangelist
Profile
Posts: 399
Reg: Jan 18, 2011
location unknow...
7,240
like
09/01/13 05:41 PM (12 years ago)
Thanks Jake, that helps! David
 
GadgetWerx
Aspiring developer
Profile
Posts: 101
Reg: Jul 05, 2012
Redlands
6,010
like
09/01/13 06:30 PM (12 years ago)
This is fascinating to read. I am right in the middle of learning about Manual Memory management, and ARC. Good to know that BT 2.0 doesn't support ARC. Scott
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.