I have been working in iOS autofill credential extension since long days. I have checked so many iOS articles and videos. But I am not able to show credential on quick type bar, reset things are successfully integrated. Can any give me quick help?
Using this video and url which was shared from apple:
https://developer.apple.com/videos/play/wwdc2018/721
https://developer.apple.com/documentation/authenticationservices
I am using below code to save credential to Keychain for particular domain.
let keychain = Keychain(server: "instagram.com", protocolType: .https, authenticationType: .htmlForm)
keychain["emailAddress"] = "Password"
And use this code for save domain:
func savedomain(domain: String, account: String, password: String, completion: ((Bool, SharedWebCredentialsManagerError?) -> Void)? = nil) {
SecAddSharedWebCredential(domain as CFString, account as CFString, password as CFString?) { error in
guard let error = error else {
completion?(true, nil)
return
}
let errorDescription = CFErrorCopyDescription(error) as String
let saveFailedError = SharedWebCredentialsManagerError.saveFailed(errorDescription)
completion?(false, saveFailedError)
}
}
I have created autofill extension and getting saved credentials, but not able to display credential on quick type bar in safari for instagram.com
You need to populate ASCredentialIdentityStore in order for the quicktype bar to work. See the description of ASCredentialProviderViewController:
This is also described in the WWDC presentation you reference.