I have some code in an app that creates a CoreData managed object. In this code, I use the following line to set a property:
theAuthor.authorID = 1;
The property is declared like this in the managed object header:
@property (nonatomic) uint32_t authorID;
In iOS 5 it works fine, but when I debug in iOS 4.3, I get this error:
Property 'authorID' is a scalar type on class 'Author'. Cannot generate a setter method for it.
Why am I getting this error in 4.3, but not in 5? Should I be avoiding scalar properties? I came to Obj-C from C, so I prefer to work with scalars when I can, as it feels more optimised.
Would I be better implementing the getters and setters or changing my code to use NSInteger or NSNumber instead?