In my interface (.h) file, I have
@property(readonly) NSString *foo;
and in my implementation (.m) file, I have
@synthesize
You've declared a @property
that doesn't have a backing ivar. Thus, when the compiler sees @synthesize
, it tries to synthesize a backing ivar for you. But you haven't specified what kind of ivar you want. Should it be __strong
? __weak
? __unsafe_unretained
? Originally, the default storage attribute for properties was assign
, which is the same as __unsafe_unretained
. Under ARC, though, that's almost always the wrong choice. So rather than synthesizing an unsafe ivar, they require you to specify what kind of ivar you want.