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
# Size of preview images for Safari's top sites / history | |
du -ch {~/Library/Caches/,`getconf DARWIN_USER_CACHE_DIR`}com.apple.Safari |
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
if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) { | |
if ([error code] == NSPersistentStoreIncompatibleVersionHashError) { | |
NSLog(@"Persistent Store Incompatible Version error. Please check %@", storeUrl); | |
} else { | |
NSLog([error description]); | |
} | |
} |
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
// How to encode NSData for a HTTP request | |
NSString *dataString = [[NSString alloc] initWithFormat:@"%@", someData]; | |
NSString *dataEncoded = [dataString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; | |
NSLog(@"Encoded data = %@", dataEncoded); |
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
// Resetting the application badge number | |
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; |
NewerOlder