-1

My employer want an reminder app but don't want to add any thing in built-in reminder app, because using eventkit framework reminders will be added in reminder app of iOS.

On other hand UILocalNotification is limited to 64 per app and also limited set of repetition.

The requirement is after selecting a dates from calendar custom repetition can be set in these manner

  1. Calculate how much time left in ending of a day and set repetition after every hour.

  2. User can define custom number how many times like 2, 3 or 50. The notification will trigger 2 times in a day or 3 times in a day or 50 times in a day according to how much time left in ending of a day.

  3. User can manually choose multiple times in a day.

I have to deliver this in two days, what are available possibilities with limitations of both approaches?

enter image description here

S.J
  • 3,063
  • 3
  • 33
  • 66
  • If you can't answer it means you will vote to close. – S.J Nov 11 '14 at 05:15
  • anything still unclear? – nburk Nov 11 '14 at 08:03
  • can you formulate what problem you have with `UILocalNotification`? it does everything you need to to according to the requirements (not everything comes out of the box, but you can definitely program it to accomplish what you specified) :) – nburk Nov 11 '14 at 08:30

1 Answers1

2

If I understood you correctly, your employer does not want to use any built-in reminders from either the Calendar.app or the Reminders.app.

Apple's documentation for the alarm/reminder functionality in EventKit states:

Note: An alarm is not intended to serve as a UILocalNotification. An alarm requires you to create an event or reminder that is visible in the user’s Calendar or Reminders app. A UILocalNotification is better suited for general purposes that don’t involve the Calendar database.

So, from Apple's description it sounds like your requirements can best be solved using UILocalNotification. I haven't worked with EventKit myself, but just from the documentation and my own experience with UILocalNotification I would highly recommend to build your app upon UILocalNotification and not EventKit.

nburk
  • 22,409
  • 18
  • 87
  • 132
  • I am already using UILocalnotification but having limitation of 64 allowed and no custom repetition. – S.J Nov 11 '14 at 05:16
  • the fact that you can only schedule 64 notifications from your app shouldn't be an issue at all. what you will have to do is just to always make sure that the _next_ 64 notifications are scheduled. so e.g. every time when one notification fires, you need update the scheduled notifications and make sure another one is scheduled. – nburk Nov 11 '14 at 05:56
  • and what exactly do you mean by custom repitition? – nburk Nov 11 '14 at 05:57
  • Custom repetition means calculate how much time left in ending of a day and set repetition after every hour. – S.J Nov 11 '14 at 07:24
  • can't you use `UILocalNotifications`'s property `repeatInterval` for that? – nburk Nov 11 '14 at 07:40
  • UILocalNotifications's property repeatInterval how can I get repetition after every 1:30 hour or after every 2 hour etc. – S.J Nov 11 '14 at 08:22
  • ah well, that's not possible indeed... `repeatInterval` only takes values of `NSCalendarUnit`. However, it is no problem at all to implement this custom repition by yourself. One way to do it would be to subclass `UILocalNotification` and add your custom repition functionality. Another way to approach your issue (which I would recommend) is to build a `NotificationManager` class that _always_ knows which are the next 64 notifications to be scheduled, every time one notification is fired, you update the _next_ 64 notifications... – nburk Nov 11 '14 at 08:26