I've got a project which has in it a protocol, a class implementing that protocol, and a subclass of the implementation class. This is our production application.
@protocol ProductionProtocol<NSObject>
@property (nonatomic, retain) NSString *role;
@end
@interface BaseProduction : NSObject<ProductionProtocol>
NSString *role;
@end
@implementation BaseProduction
@synthesize role;
@end
@interface Production : BaseProduction
@end
@implementation Production
@end
I've also got a proof of concept (POC) application, which is implemented as a separate project that includes the production application. In the POC application, I have a protocol that extends the production protocol, and a class that extends the production class.
@protocol POCProtocol<ProductionProtocol>
-(void)cancel;
@end
@interface POC : Production<POCProtocol>
@end
@implementation POC
-(void)cancel{...}
@end
Notice that in the ProductionProtocol, I've got a role NSString which is declared, and implemented in the BaseProduction interface/class. in the POC, I've got a method 'cancel' which is declared in the protocol, but not in the interface/class.
So here's my question: with my class structure set up like this, I get this warning:
Property 'role' requires method '-role' to be defined - use @synthesize, @dynamic or provide a method implementation
I don't understand why I'm getting this warning. Since the synthesized properties are in the base class, they should be available to the POC class - and a quick test seems to confirm that they are. So what am I doing wrong here?