Contents

preAuthorizeDiagnosisKeys(completionHandler:)

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

Declaration

func preAuthorizeDiagnosisKeys(completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
func preAuthorizeDiagnosisKeys() async throws

Parameters

  • completionHandler:

    The completion handler the framework calls when the method completes.

Discussion

This method prompts the user when getting tested to share their diagnosis keys if they receive a positive test result. An app should only call this method if it has a way to determine that the user is about to take a COVID test, such as apps that allow users to schedule testing appointments, and that can also determine if the result is positive.

The authorization duration is five days.

See Also

Preauthorizing Exposure Keys