5

I am developing an app that needs access to the calendar data base. I put in a code that now asks for permission which I found on the site, and thanks for that:

requestAccessToEntity iOS6- Backwards compatibility - EKEventStore

However for testing purposes I would like to be able to deactivate the permission and rerun the app so that the question is asked again. If I delete the app from the device and reinstall it, the device remembers that the permission was asked and will not ask again. If I turn the permission off again the permission will not be asked again but obviously none will not be accessible. So How can I make the device fully forget that it has installed the app. Thanks

Reza

Community
  • 1
  • 1
reza23
  • 3,079
  • 2
  • 27
  • 42

1 Answers1

9

Settings - General - Reset - Reset Location & Privacy

craigmarch
  • 534
  • 3
  • 9
  • 1
    @craigmarch How do we handle the case where the user denies permission for the first time. It is imperative for my app to use the calendar so if he denies permission the first time, any way i can trigger the Alert message requesting permission at a later point of time? From a UX perspective asking them to rest privacy settings doesn't feel right. – B K Nov 07 '12 at 11:42
  • 1
    @BK there's no way that I'm aware of using the Event Kit framework to prompt the user again. They would need to goto Settings - Privacy - Calendars and give your app access manually. – craigmarch Nov 08 '12 at 22:10
  • @BK You can't trigger Apple's dialog again, but you can test for EKAuthorizationStatusDenied and put up your own request for the user to turn on the switch. – Jeff Nov 11 '12 at 09:15