In one of the very big projects I used auto-synthesized properties everywhere:
//MyClass.h file:
@interface MyClass : NSObject
@property (nonatomic, retain) NSString *deviceName;
@property (nonatomic, retain) NSString *deviceID;
@end
//MyClass.m file:
#import "MyClass.h"
@implementation ApplicationStatus
// no @synthesize used at all.
-(void)dealloc{
[_deviceName release]; // gives errors only while converting to ARC with LLVM 5.0
[_deviceID release];
[super dealloc];
}
@end
The code above compiles well in non-ARC mode and also in older Xcode versions during ARC conversion process. When trying to convert in using newest LLVM 5.0 compiler (newest Xcode) it gives me millions of errors:
What is the cause of this? Do I have to manually create hundreds of instance variables and @synthesize them manually now? Wouldn't that be step back from 'write less code' philosophy Apple advertised on all WWDCs?