my code is below :
NSURL *urlID = [objID URIRepresentation];
NSString *strID = [urlID absoluteString];
NSDictionary *infoDict = [NSDictionary dictionaryWithObjectsAndKeys:strID, @"objectID", nil];
localNotification.userInfo = infoDict;
then i want to get the objected like this:
NSString *strID = [notification.userInfo objectForKey:@"objectID"];
NSURL *urlID = [[NSURL alloc] initWithString:strID];
NSManagedObjectID *objID = [[NSPersistentStoreCoordinator alloc] managedObjectIDForURIRepresentation:urlID];
but the objID is nil. anything wrong ? how to do that ? thank you !