This might not be a difficult question to answer for many of you,but would you let me know why the notification is fired, even though i delete the event for it from DataBase(Core-Data).
Thank You,
Best Regards.
This might not be a difficult question to answer for many of you,but would you let me know why the notification is fired, even though i delete the event for it from DataBase(Core-Data).
Thank You,
Best Regards.
You have to cancelLocalNotification to stop firing the UILocalNotification
EDIT
I added here a method to cancel local notification. You need to maintain an id in the notification.userInfo(dictionary) for every notifications. if you want to cancel notification pass the id of notification in this method
-(void)cancelNotificationForId:(NSString*)id {
NSArray *notifs = [[UIApplication sharedApplication]scheduledLocalNotifications];
for (UILocalNotification *notification in notifs) {
if ([[notification.userInfo objectForKey:@"alarm_id"] isEqualToString:id]) {
[[UIApplication sharedApplication] cancelLocalNotification:notification];
}
}
}
Try this method
You need to remove notification with the help of notification ID.
For more reference regarding the terms mentioned in answers by user2339310 and manujmv, please refer Apple Documentation for Canceling Local Notification. This will clear the concept of UILocalNotification and there cancellation.