Thanks @iOS_Developer for the writing part.
NSString *resourcepath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"filename.strings"];
NSString *filePath = [kSXBFileManLibraryDirectoryPath stringByAppendingPathComponent:@"filename.strings"];
Write:
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
if ([fileManager copyItemAtPath: resourcepath toPath:destination error:&error]){
NSLog(@"Copy Success");
}
else{
NSLog(@"Copy error: %@", error);
}
Read:
NSString *newPath = [kLibraryDirectoryPath stringByAppendingPathComponent:@"filename.strings"];
NSDictionary *contents = [NSDictionary dictionaryWithContentsOfFile:newPath];
NSLog(@"contents:%@", [contents objectForKey:@"login.background"]);
where;
#define kLibraryDirectoryPath [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) firstObject]
filename.strings
"login.background" = "FE8100";
"login.textField" = "FE8100";
"login.button" = "1B0D62";