I’m curious as to why I’m still getting accessor method warnings even though I already have @dynamic in the implementation files. Form and Module are Core Data entities and their respective classes were automatically generated by Xcode.
In Form.h :
@property (nonatomic, retain) NSSet *modules;
In Form.m :
@dynamic modules;
(The Form entity has modules as a to-many relationship and it itself is inversely a to-one relationship of a module.)
Oddly, Modules also gets a warning about missing accessors for a simple NSString * property that also has its @dynamic in the .m file.
In Module.h :
@property (nonatomic, retain) NSString * moduleDescription;
In Module.m :
@dynamic moduleDescription;
Ah, I remember I had temporary manually-created duplicates of these classes, but under different filenames. But because the class names inside were still the same, I’m guessing the compiler saw them as continuations of the same class definition. Upon removing the alternately-named duplicate classes (both .h and .m), the warnings resolved.
Moral of the story:
Eliminate duplicate headers or implementations, even if they have different file names.