requestFullAccessToEvents(completion:)
Prompts people to grant or deny read and write access to event data.
Declaration
func requestFullAccessToEvents(completion: @escaping @Sendable (Bool, (any Error)?) -> Void)func requestFullAccessToEvents() async throws -> BoolParameters
- completion:
The block to call when the request completes.
Mentioned in
Discussion
Requesting access to an event store asynchronously prompts people for permission to use their data. The operating system only prompts them the first time your app requests full access to events; any subsequent instantiations of EKEventStore uses existing permissions. When they grant or deny access, EventKit calls the completion handler on an arbitrary queue.
Your app isn’t blocked while the person decides to grant or deny permission. Because they may deny permission, your app should handle cases where it doesn’t receive access to the event store.