Installed UI7Kit and thus FoundationExtension earlier but got a weird hard-to-debug crash. Took a while to figure out but finally tracked down the culprit to
@implementation NSMutableArray (Functional)
- (void)map:(NSAObjectUnaryOperator)mapper {
NSUInteger count = self.count;
for (NSUInteger i = 0; i < count; i++) {
self[i] = mapper(self[i]);
}
}
This category implementation overrode a previous category I have on NSMutableArray (though BlocksKit), which caused the crash at runtime. NSMutableArray is such a generic class and map: is such a generic method signature that it's almost guaranteed to run into method name clash problems for any projects of reasonable size and complexity, making FoundationExtension (and by extension UI7Kit) unusable :(. Could take an approach similar to MagicalRecord (https://github.com/magicalpanda/MagicalRecord/blob/develop/MagicalRecord/CoreData%2BMagicalRecord.h#L14), define a macro if you want the shorthand version offered by FoundationExtension, otherwise prefix all category methods on core Objective C classes with fe_ for Foundation Extension.
Installed
UI7Kitand thusFoundationExtensionearlier but got a weird hard-to-debug crash. Took a while to figure out but finally tracked down the culprit toThis category implementation overrode a previous category I have on
NSMutableArray(though BlocksKit), which caused the crash at runtime.NSMutableArrayis such a generic class andmap:is such a generic method signature that it's almost guaranteed to run into method name clash problems for any projects of reasonable size and complexity, making FoundationExtension (and by extension UI7Kit) unusable :(. Could take an approach similar to MagicalRecord (https://github.com/magicalpanda/MagicalRecord/blob/develop/MagicalRecord/CoreData%2BMagicalRecord.h#L14), define a macro if you want the shorthand version offered byFoundationExtension, otherwise prefix all category methods on core Objective C classes withfe_for Foundation Extension.