I'm trying to attach an NSManagedObjectID to a UILocalNotification but keep getting the error: Property list invalid for format: 200 (property lists cannot contain objects of type 'CFType')
Here's my code (taskID is an NSManagedObjectID):
// Create the new notification
UILocalNotification *newNotice = [[notificationClass alloc] init];
[newNotice setFireDate:date];
[newNotice setTimeZone:[NSTimeZone defaultTimeZone]];
[newNotice setAlertBody:@"Test text"];
// Add the object ID to the userinfo
NSDictionary *myUserInfo = [NSDictionary dictionaryWithObject:taskID forKey:@"TaskID"];
newNotice.userInfo = myUserInfo;
taskID is passed into the function with this code (first parameter):
addNotification([task objectID], [task taskname], [task taskexpiry]);
task is an NSManagedObject and that code has been tested and working fine for a long time.
From everything I've read this should work. Any help would be greatly appreciated.
Jason