Created
February 15, 2013 07:49
-
-
Save hyukhur/4959036 to your computer and use it in GitHub Desktop.
NSDictionary(NSArray) to Plist
This file contains hidden or 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
NSArray *sDirs = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *sPath = [[sDirs objectAtIndex:0] stringByAppendingPathComponent:@"timeZoneMap.plist"]; | |
NSDictionary *sZone = [(id)[NSLocale class] performSelector:@selector(ISOCountryCodesToTimeZoneMap)]; | |
NSData *sTmp = [NSPropertyListSerialization dataWithPropertyList:sZone format:NSPropertyListBinaryFormat_v1_0 options:kCFPropertyListImmutable error:nil]; | |
[sTmp writeToFile:sPath atomically:YES]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment