Saturday, 23 November 2013

Request authorization to Calendars

This code use for calendars access

 if ([eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)])  
   {  
         [eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error)  
        {  
               if (granted)  
               {  
                    //the Calendars permission is given  
                   //do your code for Calendars  
               }  
               else{  
                    //the Calendars permission is not given  
               }  
         }];  
   }  

//For get permission for calendars, The user has previously denied access 

//iOS Settings > Privacy > Calendars > MY APP > ENABLE | DISABLE 

No comments:

Post a Comment