I have a project which has a category for NSString as below
@interface NSString (DataEncoding)
- (NSString *)com_EncryptWithISBN;
@end
@implementation NSString (DataEncoding)
- (NSString *)com_EncryptWithISBN
{
return [self com_EncryptWithKey:[HMHBundleInfoAccess sharedInstance].ISBN];
}
@end
I have this in a different project(B) and it works fine within that project. Now I moved project B to another project A. Now the same code is giving me an error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString com_EncryptWithISBN]: unrecognized selector sent to instance 0xd334600'
I doubt whether the category is not linked properly when added as a subproject of Project A.
I have seen this link but no change. Do I need to add project B as a target dependency for Project A?
Any help highly appreciated.
Thanks