How to autofill password on iOS?

i got a app on applestore, it use ionic 4 & capacitor. But i can’t save id password in the first time login and update it.
I try

It would be great to be able to get associated domains to work properly in Ionic, I have spent weeks of development time over the past couple of years to get them to work but am yet to succeed.

The question generally gets ignored by the Ionic team.

1 Like

Oh. thank you! I also spent weeks for it. Sadlly, to no avail.
I can see pretty much the same questions in some forum, but no as exact answer to it.
I have been thinking of matching swift + ionic. Because I was test with sample login form on ios native, it has worked.
But combining the two languages seems complicated and will take me time to learn to work with Swift. My current job is not allow me to do that

@ManhDo1107, I wrote about site association in the Capacitor docs. See if that helps.

@sjregan - if you have a forum post, tag me on it and I can take a look. thanks.

1 Like

Thanks for the link, it discusses ‘Deep Linking with Universal and App Links’ where the issue is for Autofill Credentials from Keychain on iOS.

It does not seem possible to get usernames and passwords to autofill from associated domain credentials, even when you have setup the apple-app-site-association and the associated webcredentials domain in the Xcode project.

I have confirmed the validity of the apple-app-site-association using online tools, I have confirmed through device console logs and server access logs that the swcd process is fetching the file and parsing the file.

It does not make a difference whether native HTML elements are used, or Ionic elements, whether they are Angular reactive forms or not, nothing seems to work.

So if you have an example working app, or advice on how to make it work it would be much appreciated.

1 Like

@netkow, Oh thanks for the link, But i’ve read it before. As noted above, I have taken the steps " Create Site Association File" & " Add Associated Domain" for my app.
But it not working for me! I can’t understand why.

So if you have an example app with form login can autofills password on ios or detail solution, let me know.
Thank you very much for your reply !

@sjregan You can tag me on the post of you at ionicteam github? Thanks you !

I found this Capacitor issue where they use type="password" to trigger keychain:

<ion-input required autocomplete clearInput type="password" inputmode="password"></ion-input>

Give that a try. There’s also a known WebKit bug which may be related.

Thanks for the tips.

I have tried variations of the ‘autocomplete’ and ‘inputmode’ attributes, additionally I am already familiar with that webkit bug and previously changed my code to ensure the ion-input was not in a shadow-dom element.

Also using plain HTML elements does not work either.

Before I implemented the work around for the shadow-dom issue, the password accessory bar did not display. After the change the password accessory bar does display, however it does not offer the passwords for the associated domain.

@netkow I have tried it before. But it doesn’t is problem.
I hope you can give me a complete example of autofills in ios. That would be a great thing to me and @sjregan