How to log local notifications when an application is in the background or closed by iOS

I am working on a Contact Manager application in which I have to indicate money notifications for contacts who have a birthday on the same day or the day before the current date. Can I do this in the background or when my application is down. Is it possible? If so, give useful links or blogs. Thanks

+4
source share
1 answer

You cannot register for local notifications when you are in the background. Use the registration code below for local notification.

UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.alertBody = @"Your text";
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:120.0]; // your date
[[UIApplication sharedApplication]scheduleLocalNotification:localNotification];

, : didReceiveLocalNotification. ,

0

All Articles