We have our library we ship to our customers, and I\'d like to mark some methods as \"deprecated\" because we changed them (like Apple does in the iPhone SDK).
I\'ve
You can also use more readable define DEPRECATED_ATTRIBUTE
It defined in usr/include/AvailabilityMacros.h
:
#define DEPRECATED_ATTRIBUTE __attribute__((deprecated))
#define DEPRECATED_MSG_ATTRIBUTE(msg) __attribute((deprecated((msg))))
Objective-C methods example:
@interface MyClass : NSObject { ... }
-(void)foo:(id)x DEPRECATED_ATTRIBUTE;
// If you want to specify deprecated message:
-(void)bar:(id)x DEPRECATED_MSG_ATTRIBUTE("Use baz: method instead.");
...
@end
You can also mark the whole class as deprecated:
DEPRECATED_ATTRIBUTE
@interface DeprecatedClass : NSObject { ... }
...
@end