I can enable an UILocalNotification
in my application, I proceed like this:
in my UIViewController
if(_endDate){
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
return;
localNotif.fireDate = _endDate;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.alertBody = @"go";
localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
}
in Appdelegate
:
-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
application.applicationIconBadgeNumber = 0;
}
When the notification appears, I launch the app, I enter into the delegate correctly but after that, the application crash.
I work in IO6
Can you help me ?