ios - How to pass NSManagedObject to userInfo of UILocalNotification -


i'm trying pass nsmanagedobject userinfo of uilocalnotification, like:

nsmanagedobject *obj = ...;  uilocalnotification* localnotification = [[[uilocalnotification alloc] init] autorelease]; localnotification.userinfo = [nsdictionary dictionarywithobjectsandkeys:obj, @"keyname", nil]; 

but crashed below error

property list invalid format: 200 (property lists cannot contain objects of type 'cftype') *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: 'unable serialize userinfo: (null)'

to understanding, root cause nsmanagedobject not serializable, how fix issue? workaround here?

i have tried nsmanagedobjectid, , got same error here.

try matt gallagher has great blog post this: http://cocoawithlove.com/2008/08/safely-fetching-nsmanagedobject-by-uri.html

and try : error when setting userinfo in uilocalnotification


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -