Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter iOS autofill strong password error

I get this error:

[AutoFill] Cannot show Automatic Strong Passwords for app bundleID: com.my.app due to error: Cannot save passwords for this app. Make sure you have set up Associated Domains for your app and AutoFill Passwords is enabled in Settings

I have enabled associated domains and autofill credential provider

enter image description here

Associated domains is also enabled on appstore connect.

On my physical device autofill is enabled

enter image description here

This is my code

AutofillGroup(
  child: Column(
    children: <Widget>[
      CupertinoTextField(
        controller: email,
        enableSuggestions: true,
        keyboardType: TextInputType.emailAddress,
        autofillHints: [AutofillHints.email],
      ),
      CupertinoTextField(
        controller: newPassword,
        enableSuggestions: true,
        autofillHints: [AutofillHints.newPassword],
      )
    ],
  ),
)

I would like this to happen:

enter image description here

like image 552
GILO Avatar asked Oct 29 '25 07:10

GILO


1 Answers

Ok this took me a while to work out. I used firebase to do this.

  1. Use Firebase Hosting
  2. On your computer do firebase init and set up hosting
  3. In the public folder create a folder called .well-known
  4. Add a file in the folder called apple-app-site-association Set this as your file

apple-app-site-association:

{
  "applinks": {
     "apps": [],
     "details": [
          {
       "appID": "teamID.com.your.app",
       "paths": ["*"]
          }
      ]
  },
  "webcredentials": {
     "apps": ["teamID.com.your.app"]
  }
}

in your firebase.json file add this

"hosting": {
"public": "public",
"ignore": [
  "firebase.json",
  "**/.*",
  "**/node_modules/**"
],
"headers": [
  {
    "source": "/.well-known/apple-app-site-association",
    "headers": [{"key": "Content-Type", "value": "application/json"}]
  }
],
"appAssociation": "NONE"
}

run firebase deploy --only hosting

You can check your AASA is correct at https://branch.io/resources/aasa-validator/

If it is ok go to Xcode, in signing and capabilities add associated domains:

applinks:yourfirebasewebsite.com
webcredentials:yourfirebasewebsite.com

Make sure you delete your app off your phone

Move to your flutter project directory run:

flutter clean; flutter run --release
like image 52
GILO Avatar answered Oct 31 '25 00:10

GILO



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!