在XCode中搜索整个工程,发现Socket.IO中存在decoder方法且是在NSObject分类器中创建,为了避免这个警告,修改很简单,只需在把此方法重命名即可。
修改前:
#import "SocketIOJSONSerialization.h"
extern NSString * const SocketIOException;
// covers the methods in SBJson and JSONKit
@interface NSObject (SocketIOJSONSerialization)
// used by both JSONKit and SBJson
- (id) objectWithData:(NSData *)data;
// Use by JSONKit serialization
- (NSString *) JSONString;
- (id) decoder;
// Used by SBJsonWriter
- (NSString *) stringWithObject:(id)object;
@end
修改后:
#import "SocketIOJSONSerialization.h"
extern NSString * const SocketIOException;
// covers the methods in SBJson and JSONKit
@interface NSObject (SocketIOJSONSerialization)
// used by both JSONKit and SBJson
- (id) objectWithData:(NSData *)data;
// Use by JSONKit serialization
- (NSString *) JSONString;
- (id) jsonDecoder;
// Used by SBJsonWriter
- (NSString *) stringWithObject:(id)object;
@end
因此,为避免苹果审核出现问题(non-public selectors in payload...),尽量在命名方法时候不要使用单个“单词”且该词过于敏感(未来可能会被苹果使用)的方式命名。