Knowing that from Xcode4 and LLVM 2.0 there is the new feature “@syntesize by default”
I tried the following code:
@interface PDFPage : NSObject
@property (nonatomic,copy) NSString *name;
@property (nonatomic,assign) int page;
@end
@implementation PDFPage
-(void)dealloc
{
[self.name release];
[super dealloc];
}
@end
I assumed that @synthesize was no longer necessary but the compiler (Apple LLVM 2.1) give me a warning like ‘warning: property ‘page’ requires method ‘page’ to be defined – use @synthesize, @dynamic or provide a method implementation’
What else I need to do to enable @synthesize by default ? (I also tried the flags -Xclang -fobjc-nonfragile-abi2 but they are not recognized).
Thank you
Apple removed the automatic
@synthesizefeature from the non-fragile ABI because of issues it was causing or uncertainties the compiler had when trying to autosynthesize properties. See this blog post for more information about it.