requestPairingCode(for:session:reason:authorizationMethod:)
Presents a pairing user interface so the user can enter authorization credentials for a device.
Declaration
@MainActor final func requestPairingCode(for device: MediaOutputDevice, session: MediaOutputSession, reason: LocalizedStringResource, authorizationMethod: MediaOutputDevice.AuthorizationMethod)Parameters
- device:
The device needing authorization.
- session:
The session associated with the pairing request.
- reason:
The reason why the user is being asked to input authorization.
- authorizationMethod:
The type of authorization user interface to present to the user.
Mentioned in
Discussion
Call this function when the session requires user input for pairing.