Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Calendar Functionality No Longer working in ios 6

In the app I am currently developing there is interaction between the user and the users calendar, like what happens in many apps, very standard stuff. It was working fine until I upgrade to ios 6. I am now faced with the "This app does not have access to your calendars. You can enable access in Privacy Settings" dialog when I try to perform those same calendar functions yet my app does not appear on the devices calendar privacy settings. Is there some new api I need to use in order to ask the user to grant access?

Thanks a lot for helping me out with this issue whoever can help.

like image 239
JLoewy Avatar asked Sep 21 '12 20:09

JLoewy


People also ask

Why is my Calendar app not working?

Restart your device It's an easy and quick fix that only takes a minute or so. If you find Calendar not working, press and hold the power button on your device and tap the Restart option that appears on the screen. After the smartphone turns back on, open the Calendar app and check if the problem has been solved.

Why has my Calendar view changed on iPhone?

The calendar app has changed to a scrolling today view that prioritizes events over time by taking away the time grid. This takes away the ability to see when I'm most available (at what times do I have nothing scheduled) as well as the ability to better visualize overlapping events (such as nanny coverage).


1 Answers

I believe I have the exact same issue. I am deploying a normal Developer-build of the app I am working on to my iPhone 4 with iOS 6.

EDIT: I finally solved it like this, I did not find the info on the web but rather I found it in the APIs.

Run the following to request permission. This is apparently an asynchronous call and access will not be granted until the user have authorized the app.

EKEventStore *es = [[EKEventStore alloc] init];
[es requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
    /* This code will run when uses has made his/her choice */
}];

Furthermore you may specify what the app is trying to do with the information in Info.plist. There is a key called Privacy - Calendars Usage Description (NSCalendarsUsageDescription) that can contain a string description that will be displayed in the prompt to the user.

Below are the full details of the problem I encountered (fixed by the above):

When I try to att an event to the calendar I see the following screen: Add Event error message

When I open settings for the calendar privacy settings, no app is visible: Settings, Privacy, Calendars

This all leads me to think that there is some setting I must put in Info.plist to enable calendar access and to ask the user for permission on start up. I have searched the web but not found anything.

@jloewy, I guess this is the same problem you are having?

like image 97
www.jensolsson.se Avatar answered Oct 12 '22 00:10

www.jensolsson.se