UILocalNotification crash
- by Miky Mike
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 ?