Skip to content

Fixing problems with Protocol *

Nat! edited this page Feb 25, 2017 · 2 revisions

If you are messaging a Protocol you are out of luck.

Otherwise rewrite

+ (BOOL) conformsToProtocol:(Protocol *) protocol

as

+ (BOOL) conformsToProtocol:(PROTOCOL) protocol

If you need to stay backwards compatible, consider

#ifndef __MULLE_OBJC___
typedef Protocol   *PROTOCOL
#endif

or

#ifndef __MULLE_OBJC___
#define PROTOCOL   (Protocol *)
#endif