---
title: "requestAccess(to:completion:)"
framework: eventkit
role: symbol
role_heading: Instance Method
path: "eventkit/ekeventstore/requestaccess(to:completion:)"
---

# requestAccess(to:completion:)

Prompts the person using your app to grant or deny access to event or reminder data.

## Declaration

```swift
func requestAccess(to entityType: EKEntityType, completion: @escaping @Sendable (Bool, (any Error)?) -> Void)
```

```swift
func requestAccess(to entityType: EKEntityType) async throws -> Bool
```

## Parameters

- `entityType`: The event or reminder entity type.
- `completion`: The block to call when the request completes.

## Discussion

Discussion In iOS 6 and later, requesting access to an event store asynchronously prompts your users for permission to use their data. The user is only prompted the first time your app requests access to an entity type; any subsequent instantiations of EKEventStore uses existing permissions. When the user taps to grant or deny access, the completion handler will be called on an arbitrary queue. Your app isn’t blocked while the user decides to grant or deny permission. After users choose their permission level, the event store either calls the completion handler or broadcasts an EKEventStoreChangedNotification. The completion handler is called on iOS 6 and later, and the notification is broadcasted on iOS 5. Because users may deny access to the event store, your app should handle an empty data case. 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 after the user grants access.
