setExposureNotificationEnabled(_:completionHandler:)
Enables or disables exposure notification.
Declaration
func setExposureNotificationEnabled(_ enabled: Bool, completionHandler: @escaping @Sendable ((any Error)?) -> Void)func setExposureNotificationEnabled(_ enabled: Bool) async throwsParameters
- enabled:
A Boolean that enables or disables exposure notification.
- completionHandler:
The completion handler that the framework calls once exposure notification is enabled or disabled.
Discussion
If the user hasn’t authorized exposure notification, this method displays a user dialog requesting consent.