0

I have this method from a library I use:

- (void)my_setObject:(id)object forKey:(NSString *)key {
    BOOL equal = [[self objectForKey:key] isEqual:object];
    [self my_setObject:object forKey:key];
    if (!equal && ![key isMatchedByRegex:iCloudBlacklistRegex] && [NSUbiquitousKeyValueStore defaultStore]) {

  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
        [[NSUbiquitousKeyValueStore defaultStore] setObject:object forKey:key];
    });
    }
}

I had understood that calling [self method] in a category it would call the original implementation of the method, but I am getting crash reports on a recursive calling of the same method. How can I assure that the original implementation is called? I guess [super method] will not get the same result...

0 Answers0