It's as simple as that.
Running Lion.
Verified compiler is set to 'LLVM 4.0'.
Then I did the same test but created a new project within XCode 4.4, and voila! Auto @synthesize works within a 4.4 project.
Auto @synthesize also seems to work on new properties added to the code. But existing old one generate an error.
Anyone else experience this? Any other things I should check for?
I really want the auto generation features to work.
Thanks.
The Error isn't the way you declare the property but in the way that you use it.
Auto-synthesized properties create a backing store with a leading underscore by default.
So in your code when you have a property declared as:
@property (nonatomic, strong) UILabel *sectorLabel;
and you auto-sythesize - something like this is being auto-generated for you by the compiler:
@synthesize sectorLabel = _sectorLabel;
Now you can access it through the the property:
self.sectorLabel;
Or, you can access the backing store directly with:
_sectorLabel;