Since upgrading to Xcode 5.1, I'm starting to see the following warning in some code my project uses. I'm trying to figure out what it means.
Warning: Auto property synthesis will not synthesize property 'responseHeader' because it is 'readwrite' but it will be synthesized 'readonly' via another property
The code where it's occurring, in the .m file:
@interface S3Response ()
@property (nonatomic, readwrite, retain) NSDictionary *responseHeader;
@end
The previous declaration of the property, in the .h file:
@property (nonatomic, readonly) NSDictionary *responseHeader;
There is no @synthesize
statement for that property, nor are responseHeader
or setResponseHeader
defined as methods. There is however an explicit definition of an ivar named responseHeader
.
Seems pretty straightforward to me: property is declared as read-only for users of the class, but read-write locally so the class can set it.
What does this warning mean, and what should I do about it?