A general solution is to separate a common protocol and force derived protocols to implement a common protocol, for example:
@protocol PrintCommon -(void) printCommon; @end @protocol P1 < PrintCommon > // << a protocol which declares adoption to a protocol -(void) printP1; // -(void) printCommon; << available via PrintCommon @end @protocol P2 < PrintCommon > -(void) printP2; @end
Now the types that accept P1 and P2 must also accept PrintCommon methods to execute the accept, and you can safely pass the parameters NSObject<P1>* through NSObject<PrintCommon>* .
source share