Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [NSKeyedArchiver archiveRootObject:rootObject toFile:path];
- NSString *error = nil;
- NSData *mySerializedObject = [NSKeyedArchiver archivedDataWithRootObject:myObject];
- NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:mySerializedObject
- format:NSPropertyListXMLFormat_v1_0
- errorDescription:&error]:
- if( xmlData ) {
- [xmlData writeToFile:myPath atomically:YES];
- } else {
- NSLog(error);
- [error release];
- }
Add Comment
Please, Sign In to add comment