Calendar Events and Permissions in iOS 6
Prior to iOS 6, accessing the calendar didn’t require any permission. We just had to create an event store and then we were able to add events through it.
With iOS6 the story is slightly different: to create a new event we ask the user for the permission to access his calendar.
Thanks to the new function requestAccessToEntityType:completion: that has been added to the EKEventStore, this operation is extremely simple.
Full article here:
http://www.thinkandbuild.it/calendar-events-and-permissions-in-ios-6/
//Request the access to the Calendar
[eventStore requestAccessToEntityType:EKEntityTypeEvent
completion:^(BOOL granted,NSError* error){
//Access not granted-------------
if(!granted){
}
//Access granted------------------
}else{
}
}];
Written by Yari D'areglia
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Objective-c
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#