Reading ProgrammingWithObjectiveC, I can say:
There’s no need to specify the strong attribute explicitly, because it is the default.
If I omit the 'strong' attribute for a property in my project like this,
@property (nonatomic) NSString *string;
it gives me a warning:
No 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed
aka.
-Wobjc-property-no-attribute
So somehow the compiler seems to be thinking that I´m still doing manual reference counting, otherwise there wouldn´t be any warning.
Also, when creating a new empty project, it doesn´t warn me when there´s no 'strong' attribute, so it must have something to do with the current project settings, maybe even some flag that isn´t reachable via the UI. The project is a rather old one (~2 years) and has undergone several migration steps in the meantime (XCode 3 > 4 > 5, Non-ARC > ARC etc.).
I´ve looked everywhere in the project settings, but somewhere seems to be a missing checkmark or something.
Anyone experiencing the same problem?
-Wsomething
. Perhaps that gives some clue. Knowing the warning you can explicitly disable it with the-Wno-something
compiler flat. – Martin R