UILocalNotification crash

Posted by Miky Mike on Stack Overflow See other posts from Stack Overflow or by Miky Mike
Published on 2011-01-09T01:25:03Z Indexed on 2011/01/09 8:53 UTC
Read the original article Hit count: 320

Filed under:
|
|

Hi everyone, could you please help me ?

I'm setting up an UILocalNotification and It crashes when I try to set its userInfo dictionary. My dictionary is not empty (It contains 88 objects).

Here is the code :

NSDictionary* myUserInfo = [NSDictionary dictionaryWithObject: fetchedObjects forKey: @"textbody"];

UILocalNotification *localNotif = [[UILocalNotification alloc] init]; if (localNotif == nil) return;

// défining the interval NSTimeInterval oneMinute = 60;

localNotif.timeZone = [NSTimeZone localTimeZone]; NSDate *fireDate = [[NSDate alloc]initWithTimeIntervalSinceNow:oneMinute]; localNotif.fireDate = fireDate;

localNotif.userInfo = myUserInfo; [fetchedObjects release];

and the console gives me this :

Property list invalid for format: 200
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'unable to serialize userInfo: (null)'

Any idea ?

© Stack Overflow or respective owner

Related posts about dictionary

Related posts about user