Last active
August 29, 2015 14:02
-
-
Save gfosco/ac6b5ebb42791ced0932 to your computer and use it in GitHub Desktop.
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
// Add these two method declarations to the Parse.framework/Headers/PFObject.h header file in your Xcode project: | |
- (void)serializeToDataFile:(NSString *)filename; | |
+ (id)objectFromDataFile:(NSString *)filename; | |
// and you can start saving and loading PFObject on disk | |
PFObject *object = [PFObject objectWithClassName:@"Todo"]; | |
[object setObject:@"Sample Text" forKey:@"text"]; | |
[object saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { | |
[object serializeToDataFile:@"test.obj"]; | |
}]; | |
// Elsewhere ... | |
PFObject *newObj = [PFObject objectFromDataFile:@"test.obj"]; | |
NSLog(@"%@", newObj); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
They are just considered 'private' methods, as in Parse does not intend for external developers to use it and it's not supported, could change, etc..