This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"Failed to save to data store: %@", [error localizedDescription]); | |
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey]; | |
if(detailedErrors != nil && [detailedErrors count] > 0) { | |
for(NSError* detailedError in detailedErrors) { | |
NSLog(@" DetailedError: %@", [detailedError userInfo]); | |
} | |
} | |
else { | |
NSLog(@" %@", [error userInfo]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@end |