I added a category to NSArray with a helper method for sorting. My unit tests all pass, but when running the app in the simulator it blows up. Could this be because of the NSMutableArray / NSCFArray class cluster stuff?
Here is the error: 'NSInvalidArgumentException', reason: '* -[NSCFArray sortBySequenceAsc]: unrecognized selector sent to instance 0x489c1f0'
Anyway, what is the proper way to add a category to NSArray and NSMutableArray?
@interface NSArray (Util)
- (NSArray *)sortBySequenceAsc;
@end
@implementation NSArray (Util)
- (NSArray *)sortBySequenceAsc {
//my custom sort code here
}
@end