Implement a COVID-19 exposure notification system that protects user privacy.


Use the ExposureNotification framework to inform people of potential exposure to COVID-19, the disease caused by the SARS-CoV-2 virus. You can build a notification system that employs random, rotating keys and identifiers to convey positive diagnoses in addition to data such as associated symptoms, proximity, and duration.

Establishing User Roles

The ExposureNotification framework defines two user roles:

Affected user

When a user has a confirmed or potential exposure to COVID-19, the framework identifies them as affected and shares their diagnosis keys to alert other users to potential exposure.

Potentially exposed user

To assign a user the potentially exposed role, use the framework to determine whether a set of temporary exposure keys indicate proximity to an affected user. If so, the app can retrieve additional information such as date and duration from the framework.



Building an App to Notify Users of COVID-19 Exposure

Inform people when they may have been exposed to COVID-19.

Setting Up an Exposure Notification Server

Ensure that your exposure notification server meets the requirements for handling COVID-19 exposure notifications.

class ENManager

A class that manages exposure notifications.


class ENExposureConfiguration

The configuration parameters for detecting exposure.

class ENExposureDetectionSummary

A summary of exposures.

class ENExposureInfo

The incident information related to a potential exposure.

typealias ENRiskLevel

The user’s estimated risk of exposure.

typealias ENRiskScore

A value signifying the risk of an exposure event.


enum ENAuthorizationStatus

A set of cases that indicates the authorization status for the app.

enum ENStatus

A set of cases that represents the overall status of exposure notification on the system.


struct ENError

Errors that the exposure notification framework issues.

enum ENError.Code

Error codes that the exposure notification framework issues.

let ENErrorDomain: String

The domain for an error.

typealias ENErrorHandler

The handler for error conditions.