<!--
{
  "availability" : [
    "iOS: 12.5.0 - 27.0.0",
    "iPadOS: 12.5.0 - 27.0.0",
    "macCatalyst: 12.5.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ExposureNotification",
  "identifier" : "/documentation/ExposureNotification/ENManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Exposure Notification"
    ],
    "preciseIdentifier" : "c:objc(cs)ENManager"
  },
  "title" : "ENManager"
}
-->

# ENManager

A class that manages exposure notifications.

```
class ENManager
```

## Overview> Important:
> This class is available in iOS 12.5, and in iOS 13.5 and later.

Before using an instance of this class, call [`activate(completionHandler:)`](/documentation/ExposureNotification/ENManager/activate(completionHandler:)). If the completion handler completes successfully, you can work with the remaining properties and methods on the class. Activating this object doesn’t enable exposure notification; it only allows this object to be used. Once activated, exposure notification can be enabled with [`setExposureNotificationEnabled(_:completionHandler:)`](/documentation/ExposureNotification/ENManager/setExposureNotificationEnabled(_:completionHandler:)), if needed.

If the app no longer needs an instance of this class, you must call [`invalidate()`](/documentation/ExposureNotification/ENManager/invalidate()), which stops any outstanding operations and invokes the invalidation handler.

> Note:
> Invalidation is asynchronous so it’s possible for handlers to be invoked after calling ``doc://com.apple.exposurenotification/documentation/ExposureNotification/ENManager/invalidate()``.

The framework invokes the invalidation handler once invalidation finishes, and performs the invocation exactly once, even if [`invalidate()`](/documentation/ExposureNotification/ENManager/invalidate()) is called multiple times. It does not call any additional handlers.

After calling [`invalidate()`](/documentation/ExposureNotification/ENManager/invalidate()), your app can’t reuse the object. A new object must be created for subsequent use. The framework clears strong references once invalidation completes to break potential retain cycles. You don’t need to use weak references within your handlers to avoid retain cycles when using this class.

## Topics

### Activating the Manager

[`-  activateWithCompletionHandler:`](/documentation/ExposureNotification/ENManager/activate(completionHandler:))

Prepares the manager for use.

[`activityHandler`](/documentation/ExposureNotification/ENManager/activityHandler)

The handler that the framework invokes when the app activates a notification manager.

[`ENActivityHandler`](/documentation/ExposureNotification/ENActivityHandler)

The handler the system invokes to report activities that occurred while the app wasn’t running.

[`ENActivityFlags`](/documentation/ExposureNotification/ENActivityFlags)

Activities that occur while the app isn’t running.

[`-  setExposureNotificationEnabled:completionHandler:`](/documentation/ExposureNotification/ENManager/setExposureNotificationEnabled(_:completionHandler:))

Enables or disables exposure notification.

### Obtaining Exposure Information

[`-  detectExposuresWithConfiguration:diagnosisKeyURLs:completionHandler:`](/documentation/ExposureNotification/ENManager/detectExposures(configuration:diagnosisKeyURLs:completionHandler:))

Detects exposures using the configuration that you specify for controlling the scoring algorithm.

[`-  detectExposuresWithConfiguration:completionHandler:`](/documentation/ExposureNotification/ENManager/detectExposures(configuration:completionHandler:))

Detects exposures using the specified configuration to control the scoring algorithm.

[`-  getExposureWindowsFromSummary:completionHandler:`](/documentation/ExposureNotification/ENManager/getExposureWindows(summary:completionHandler:))

Obtains information from the provided summary about the user’s exposure within a window of time.

[`ENGetExposureWindowsHandler`](/documentation/ExposureNotification/ENGetExposureWindowsHandler)

The handler the system invokes when the acquisition of windows completes.

[`-  getUserTraveledWithCompletionHandler:`](/documentation/ExposureNotification/ENManager/getUserTraveled(completionHandler:))

Obtains information about the user’s travel within an exposure period.

[`ENGetUserTraveledHandler`](/documentation/ExposureNotification/ENGetUserTraveledHandler)

The handler the system invokes when acquistiion of the user’s travel status completes.

[`-  getExposureInfoFromSummary:userExplanation:completionHandler:`](/documentation/ExposureNotification/ENManager/getExposureInfo(summary:userExplanation:completionHandler:))

Returns information about each exposure.

### Obtaining Exposure Keys

[`-  getDiagnosisKeysWithCompletionHandler:`](/documentation/ExposureNotification/ENManager/getDiagnosisKeys(completionHandler:))

Requests the temporary exposure keys from the user’s device to share with a server.

[`-  getTestDiagnosisKeysWithCompletionHandler:`](/documentation/ExposureNotification/ENManager/getTestDiagnosisKeys(completionHandler:))

Requests the temporary exposure keys, including the current key, used by this device for testing.

[`ENTemporaryExposureKey`](/documentation/ExposureNotification/ENTemporaryExposureKey)

The key used to generate rolling proximity identifiers.

### Configuring the Manager

[`exposureNotificationStatus`](/documentation/ExposureNotification/ENManager/exposureNotificationStatus)

A property that indicates the status of exposure notifications.

[`exposureNotificationEnabled`](/documentation/ExposureNotification/ENManager/exposureNotificationEnabled)

A property that indicates that a user enabled exposure notification.

[`authorizationStatus`](/documentation/ExposureNotification/ENManager/authorizationStatus)

A property that reports the current authorization status of the app, and never prompts the user.

[`dispatchQueue`](/documentation/ExposureNotification/ENManager/dispatchQueue)

The dispatch queue on which to invoke handlers.

### Preauthorizing Exposure Keys

[`-  requestPreAuthorizedDiagnosisKeysWithCompletionHandler:`](/documentation/ExposureNotification/ENManager/requestPreAuthorizedDiagnosisKeys(completionHandler:))

Requests diagnosis keys after the user authorizes sharing them.

[`-  preAuthorizeDiagnosisKeysWithCompletionHandler:`](/documentation/ExposureNotification/ENManager/preAuthorizeDiagnosisKeys(completionHandler:))

Allows users to authorize a one-time release of diagnosis keys within five days of the authorization.

[`ENDiagnosisKeysAvailableHandler`](/documentation/ExposureNotification/ENDiagnosisKeysAvailableHandler)

The handler the system invokes after requesting diagnosis keys.

[`diagnosisKeysAvailableHandler`](/documentation/ExposureNotification/ENManager/diagnosisKeysAvailableHandler)

The handler that receives available diagnosis keys after a successful preauthorization.

### Invalidating the Manager

[`-  invalidate`](/documentation/ExposureNotification/ENManager/invalidate())

Stops any outstanding operations and invalidates the manager.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)