requestPreAuthorizedDiagnosisKeys(completionHandler:)
Requests diagnosis keys after the user authorizes sharing them.
Declaration
func requestPreAuthorizedDiagnosisKeys(completionHandler: @escaping @Sendable ((any Error)?) -> Void)func requestPreAuthorizedDiagnosisKeys() async throwsParameters
- completionHandler:
The completion handler the framework calls when the method completes.
Discussion
If the user authorizes sharing of diagnosis keys and receives a positive test result within five days, call this method to retrieve the preauthorized keys, but only after informing the user of the positive result. ENDiagnosisKeysAvailableHandler receives the keys when the user unlocks their device. Subsequent calls to this method have no effect. If more than five days pass after the user authorizes sharing of their keys, or if the user declines to share their keys, the completion handler returns an error.