Prepares the interface to display a list of credentials from which the user can select.
- iOS 12.0+
An array of service identifiers that provide a hint about the service for which the user needs credentials.
The system calls this method to tell your extension’s view controller to prepare to present a list of credentials. After calling this method, the system presents the view controller to the user.
Use the given
service array to filter or prioritize the credentials to display. The service identifier array might be empty, but your extension should still show credentials from which the user can pick.
Items in the array with lower indices represent more specific identifiers for which a credential is requested. For example, if the array contains identifiers
[m, the item
m represents the more specific service that requires a credential.
When the user selects a credential displayed by your view controller, encapsulate the corresponding user and password strings in an
ASPassword instance and pass it to the extension context’s
Alternatively, if the user cancels the operation, call the
cancel method instead with an error that indicates user cancelation:
Always provide a way for the user to cancel the operation from your view controller, for example by including a cancel button in the navigation bar.
The system dismisses your view controller automatically after you call either the completion or cancelation method.