It’s as simple as that.
Running Lion.
- I just upgraded to XCode 4.4
- loaded my most recent XCode 4.3 project file
- commented out one @synthesize line of code
- and errors abound. 🙁
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:
and you auto-sythesize – something like this is being auto-generated for you by the compiler:
Now you can access it through the the property:
Or, you can access the backing store directly with: