Example : on 22/7/15 at 5pm fire notification "Hy how r u " And on 23/7/15 at 5pm get notification " how u feeling" likewise in everyday how i fire local notification that i assigned for each day , how to assign custom notification for each day?
You can use
repeatInterval property of
UILocalNotification and schedule a notification like this :
var notification = UILocalNotification() notification.alertBody = "text that will be displayed for notification" notification.fireDate = NSDate() notification.soundName = UILocalNotificationDefaultSoundName notification.repeatInterval = NSCalendarUnit.NSDayCalendarUnit UIApplication.sharedApplication().scheduleLocalNotification(notification)
But, if you want a notification for different message every time, you will have to create a new notification for every new message and then you can schedule them for every day. You can set notification for some number of days only. Another possible approach is to use