I'm having trouble trying to get my watchkit app to access the calendar. Before, when my phone was running ios 9 beta 3, I would get an alert asking for the app to access the calendar. Now in ios 9 beta 5, the same exact project won't create the privacy alert, so my app can't access the calendar.
Specifically this is my code (this is in my watchkit app)
if ([store respondsToSelector:@selector(requestAccessToEntityType:completion:)])
{
NSLog(@"Monkey");
[store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error)
{
NSLog(@"Banana");
/* more code here */
}
}Essentially the app now only logs "Monkey", but in ios 9 Beta 3 the app would log both "Monkey" and "Banana". Basically the app is refusing to run anything in the block
[store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error)Using breakpoints, the app just skips anything inside the block and the app continues to run. According to the documents I need this code when the app tries to access the calendar.
I'm pretty sure this is a bug because the weird part is that the watch simulator works fine with the code, and the phone simulator is in fact running ios 9 beta 5. The watch is able to grab calendar events after asking to access the calendar. But on my own watch, there are no alerts showing up and the block is just being skipped when the code is executed.
Also another thing to note that this is happening on the watchkit app and NOT on the iPhone app. The same code is in the iPhone app and the block executes, but for the watchkit app it won't execute.
More info here: http://stackoverflow.com/questions/32286673/ios-9-beta-5-calendar-privacy-access-alert-not-showing-up-on-iphone-but-is-show