respondsToSelector: is part of the NSObject protocol. Including NSObject in MyProtocol should solve your problem:
@protocol MyProtocol <NSObject>
@optional
-(void)optionalProtocolMethod:(id)anObject;
@end
respondsToSelector: is part of the NSObject protocol. Including NSObject in MyProtocol should solve your problem:
@protocol MyProtocol <NSObject>
@optional
-(void)optionalProtocolMethod:(id)anObject;
@end