0

I am developing a Calendar app for iOS.I have gone through lot of similar apps on appstore,I came across this app called RE.minder.There is a feature called BugMe which pings notification every 1 min or 1 hr on reminder.Due to Apple limitations of 64 notification I am just wondering how this feature been implemented.I read this post but its still not clear as to how it has been implemented.If repeat interval is not used and also the app is not open so that they can reschedule those notification then how those uilocalnotifications are received?

Community
  • 1
  • 1
Hardroid
  • 51
  • 6

1 Answers1

1

If you want to keep an repetitive interval of 1 minute is super easy.

  var notification = UILocalNotification()
    notification.alertBody = "Body"
    notification.alertAction = "open" 
    notification.fireDate =  //choose your date
    notification.repeatInterval = . Minute
    notification.soundName = UILocalNotificationDefaultSoundName 
    UIApplication.sharedApplication().scheduleLocalNotification(notification)

This is possible because we are asking the system to use a specific repeat interval. If you want to change interval repetition in a non-unity way, such as "each 3 min", "each 4 hours", thing get real complicated.
Each app can schedule maximum 64 notifications, by using repeatInteval as above they count one, but in the latter case you must study something that keeps a buffer on notifications and reschedule them without overflowing the 64 notifications limit.
Also remember to ask the user the permission to receive notifications or they will fail.

Andrea
  • 26,120
  • 10
  • 85
  • 131
  • I am using the repeatinterval for event repeat like daily, weekly, etc. i also want to ping the user every 1 minute until he opens the app and closes the event or reschedules it,thats where i have been stucked. – Hardik Amal Apr 04 '16 at 09:53
  • if you could check the RE.minder app.i want to implement the exact functionality.It bugs user every 1 min or 1 hr,they also have the repeat of reminder such as daily,weekly,yearly,etc – Hardik Amal Apr 04 '16 at 09:55
  • If you are using repeatInterval property even if you want to repeat each second they count as 1, thus 64 limit is not an issue – Andrea Apr 04 '16 at 09:55
  • i want to set it up for both for eg. my friends birthday is on 4th April ie today, i should receive the notification every 1min until i mark it as completed,then i would also like to repeat the same next year.i hope u got it what i mean to say... – Hardik Amal Apr 04 '16 at 10:00