Just provide a matching password in 'prepareInterfaceToProvideCredential'

Do not show the password list. This is not the task of this method.
This commit is contained in:
Danny Moesch 2021-08-27 23:36:50 +02:00 committed by Mingshen Sun
parent bc2d9aa8e8
commit 4b05d5b2ae

View file

@ -60,14 +60,11 @@ class CredentialProviderViewController: ASCredentialProviderViewController {
} }
override func prepareInterfaceToProvideCredential(for credentialIdentity: ASPasswordCredentialIdentity) { override func prepareInterfaceToProvideCredential(for credentialIdentity: ASPasswordCredentialIdentity) {
guard let identifier = credentialIdentity.recordIdentifier else { passcodelock.presentPasscodeLockIfNeeded(self) {
return self.view.isHidden = true
} after: { [unowned self] in
self.credentialProvider.credentials(for: credentialIdentity)
} }
passcodelock.presentPasscodeLockIfNeeded(self, after: { [unowned self] in
self.credentialProvider.identifier = credentialIdentity.serviceIdentifier
self.passwordsViewController.navigationItem.prompt = identifier
self.passwordsViewController.showPasswordsWithSuggestion(matching: identifier)
})
} }
@objc @objc