permission to modify calendar

In the document "Reading and Writing Reminders", at https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/EventKitProgGuide/ReadingAndWritingReminders/ReadingAndWritingReminders.html#//apple_ref/doc/uid/TP40009765-CH5-SW1, in the section "Saving and Removing Reminders", it says:


Important: If your app modifies a user’s Calendar database, it must get confirmation from the user before doing so. An app should never modify the Calendar database without specific instruction from the user.


When the code to access the user's calendar ran, a message box automatically came up to ask the user for permission to access their calendar.


But there is no message box that shows when the code to save a reminder runs.


How do I write code to ask the user for permission to modify their calendar? Is it possible to show a message box using code similar to the one asking the user to give permission to access the calendar?

Accepted Answer

Hi,


take a look at

[EKEventStore authorizationStatusForEntityType:EKEntityTypeReminder]

This will tell your app if access has been granted or not or the user has not been asked.

In order to request access from the user use:

[EKEventStore sharedEventStore] requestAccessToEntityType:EKEntityTypeReminder completion:...

This will show a message box as long as the user has not aswered the request.


Dirk

permission to modify calendar
 
 
Q