Save password in preferences under "Accounts & Passwords"

1.7k views Asked by At

At WWDC Apple presented the AutoFill feature for iOS Apps in a presentation. It is fairly simple to set up and works really well. If the user entered a password in safari and saved it. However, if the user never used Safari, but only the app, currently the user still has to type out the password every time.

I am already storing the password in the keychain. Unfortunately this does not put the password in the settings below "Accounts & Passwords > App & Website Passwords". Is there any way, how I can store the password the user entered into my app to this settings page, so that the user gets a suggestion for it, when logging in the next time?

1

There are 1 answers

0
duncanc4 On

You can add a Safari Credential in your app and it will show up in Accounts & Passwords > App & Website Passwords. This username/password will then be an autofill option.

See the docs on SecAddSharedWebCredential.