updateAuthorization(for:descriptor:completionHandler:)
Displays a view to upgrade an accessory with additional technology permissions.
Declaration
func updateAuthorization(for accessory: ASAccessory, descriptor: ASDiscoveryDescriptor, completionHandler: @escaping @Sendable ((any Error)?) -> Void)func updateAuthorization(for accessory: ASAccessory, descriptor: ASDiscoveryDescriptor) async throwsParameters
- accessory:
The accessory to update.
- descriptor:
An updated descriptor that the picker uses to add new technology authorization for the provided accessory.
- completionHandler:
A block or closure that executes after the picker is shown. The completion handler receives an Nserror instance if the upgrade operation encounters an error. In Swift, you can omit the completion handler by calling the method asynchronously and catching any error thrown by the method.
Discussion
Call this method to upgrade previously-added SSID-based accessories to use WiFi Aware.