Search code examples
objective-cnotificationspush-notificationekeventkitekevent

Possible to create 'hidden' calendar items to display notification alarms in iPhone app?


I am working on an app that incorporates user-generated events. As the app currently stands, the option to add the event to the user's calendar is optional (and this should not change, because the event could already be on the calendar from somewhere else).

I want to give the users the option to be notified before their event from the app in any case. Obviously, if the user has selected to add the event to their calendar, the best way (I believe) would be to use the alarms for the calendar event.

However, is this option available for an event if the user does not add it to their calendar? I would still like to give them options for notification... I guess I am asking - is there a way to create a 'hidden' calendar event, just for the use of the app, and use it to send the alarms the user sets up in the app?

It seems like this would be so much more straightforward than setting up push notifications. Any thoughts on the subject, or how I could approve my approach, would be much appreciated.


Solution

  • You can use local notifications which are like push notifications but don't require a server. These are available in OS4+.

    Here is a tutorial on using them.