How to create and save EKCalendar on ios 6

后端 未结 7 1241
自闭症患者
自闭症患者 2020-12-05 03:42

I\'m having an issue where I create my EKCalendar and everything looks good but then when I go to list my calendars, it doesn\'t show up. I also go to check my calendar list

7条回答
  •  忘掉有多难
    2020-12-05 03:55

    Have you tried checking authorization setting first to make sure the user has given permission to access the store?

    For EKEventStore documentation:

    + (EKAuthorizationStatus)authorizationStatusForEntityType:(EKEntityType)entityType
    
    - (void)requestAccessToEntityType:(EKEntityType)entityType completion:(EKEventStoreRequestAccessCompletionHandler)completion
    

    Important: If your app has never requested access before, you must request access to events or reminders before attempting to fetch or create them. If you request data before prompting the user for access with this method, you'll need to reset the event store with the reset method in order to start receiving data once the user grants access.

提交回复
热议问题