---
title: ENManager
framework: exposurenotification
role: symbol
role_heading: Class
path: exposurenotification/enmanager
---

# ENManager

A class that manages exposure notifications.

## Declaration

```swift
class ENManager
```

## Overview

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:). 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:), if needed. If the app no longer needs an instance of this class, you must call 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 invalidate(). The framework invokes the invalidation handler once invalidation finishes, and performs the invocation exactly once, even if invalidate() is called multiple times. It does not call any additional handlers. After calling 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

- [activate(completionHandler:)](exposurenotification/enmanager/activate(completionhandler:).md)
- [activityHandler](exposurenotification/enmanager/activityhandler.md)
- [ENActivityHandler](exposurenotification/enactivityhandler.md)
- [ENActivityFlags](exposurenotification/enactivityflags.md)
- [setExposureNotificationEnabled(_:completionHandler:)](exposurenotification/enmanager/setexposurenotificationenabled(_:completionhandler:).md)

### Obtaining Exposure Information

- [detectExposures(configuration:diagnosisKeyURLs:completionHandler:)](exposurenotification/enmanager/detectexposures(configuration:diagnosiskeyurls:completionhandler:).md)
- [detectExposures(configuration:completionHandler:)](exposurenotification/enmanager/detectexposures(configuration:completionhandler:).md)
- [getExposureWindows(summary:completionHandler:)](exposurenotification/enmanager/getexposurewindows(summary:completionhandler:).md)
- [ENGetExposureWindowsHandler](exposurenotification/engetexposurewindowshandler.md)
- [getUserTraveled(completionHandler:)](exposurenotification/enmanager/getusertraveled(completionhandler:).md)
- [ENGetUserTraveledHandler](exposurenotification/engetusertraveledhandler.md)
- [getExposureInfo(summary:userExplanation:completionHandler:)](exposurenotification/enmanager/getexposureinfo(summary:userexplanation:completionhandler:).md)

### Obtaining Exposure Keys

- [getDiagnosisKeys(completionHandler:)](exposurenotification/enmanager/getdiagnosiskeys(completionhandler:).md)
- [getTestDiagnosisKeys(completionHandler:)](exposurenotification/enmanager/gettestdiagnosiskeys(completionhandler:).md)
- [ENTemporaryExposureKey](exposurenotification/entemporaryexposurekey.md)

### Configuring the Manager

- [exposureNotificationStatus](exposurenotification/enmanager/exposurenotificationstatus.md)
- [exposureNotificationEnabled](exposurenotification/enmanager/exposurenotificationenabled.md)
- [authorizationStatus](exposurenotification/enmanager/authorizationstatus.md)
- [dispatchQueue](exposurenotification/enmanager/dispatchqueue.md)

### Preauthorizing Exposure Keys

- [requestPreAuthorizedDiagnosisKeys(completionHandler:)](exposurenotification/enmanager/requestpreauthorizeddiagnosiskeys(completionhandler:).md)
- [preAuthorizeDiagnosisKeys(completionHandler:)](exposurenotification/enmanager/preauthorizediagnosiskeys(completionhandler:).md)
- [ENDiagnosisKeysAvailableHandler](exposurenotification/endiagnosiskeysavailablehandler.md)
- [diagnosisKeysAvailableHandler](exposurenotification/enmanager/diagnosiskeysavailablehandler.md)

### Invalidating the Manager

- [invalidate()](exposurenotification/enmanager/invalidate().md)

### Instance Properties

- [invalidationHandler](exposurenotification/enmanager/invalidationhandler.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Essentials

- [Supporting Exposure Notifications Express](exposurenotification/supporting-exposure-notifications-express.md)
- [Building an App to Notify Users of COVID-19 Exposure](exposurenotification/building-an-app-to-notify-users-of-covid-19-exposure.md)
- [Setting Up a Key Server](exposurenotification/setting-up-a-key-server.md)
- [ENDeveloperRegion](bundleresources/information-property-list/endeveloperregion.md)
- [ENAPIVersion](bundleresources/information-property-list/enapiversion.md)
- [Changing Configuration Values Using the Server‑to‑Server API](exposurenotification/changing-configuration-values-using-the-server-to-server-api.md)
- [Testing Exposure Notifications Apps in iOS 13.7 and Later](exposurenotification/testing-exposure-notifications-apps-in-ios-13-7-and-later.md)
- [Supporting Exposure Notifications in iOS 12.5](exposurenotification/supporting-exposure-notifications-in-ios-12-5.md)
