How to retrieve stored reference to an NSManagedObject subclass?
- by DavidDev
Hi!
I have a NSManagedObject subclass named Tour. I stored the reference to it using this code:
prefs = [NSUserDefaults standardUserDefaults];
NSURL *myURL = [[myTour objectID] URIRepresentation];
NSData *uriData = [NSKeyedArchiver archivedDataWithRootObject:myURL];
[prefs setObject:uriData forKey:@"tour"];
Now I want to retrieve it. I…