【问题标题】:Flutter iOS autofill strong password errorFlutter iOS 自动填充强密码错误
【发布时间】:2021-09-07 06:15:28
【问题描述】:

我收到此错误:

[AutoFill] 无法显示应用 bundleID 的自动强密码:com.my.app 由于错误:无法保存此应用的密码。确保您已为您的应用设置关联域并在设置中启用自动填充密码

我已启用关联域和自动填充凭据提供程序

appstore connect 也启用了关联域。

在我的物理设备上启用了自动填充

这是我的代码

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

我希望发生这种情况:

【问题讨论】:

    标签: ios flutter dart autofill


    【解决方案1】:

    好的,这花了我一段时间来解决。我使用 firebase 来做到这一点。

    1. 使用 Firebase 托管
    2. 在您的计算机上执行firebase init 并设置托管
    3. 在公用文件夹中创建一个名为.well-known 的文件夹
    4. 在名为 apple-app-site-association 的文件夹中添加一个文件 将此设置为您的文件

    苹果应用网站关联:

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

    在你的 firebase.json 文件中添加这个

    "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"
    }
    

    运行firebase deploy --only hosting

    您可以通过https://branch.io/resources/aasa-validator/检查您的 AASA 是否正确

    如果可以,请转到 Xcode,在签名和功能中添加相关域:

    applinks:yourfirebasewebsite.com
    webcredentials:yourfirebasewebsite.com
    

    确保从手机上删除您的应用

    移动到你的flutter项目目录运行:

    flutter clean; flutter run --release
    

    【讨论】:

      猜你喜欢
      • 2019-09-02
      • 2019-04-05
      • 1970-01-01
      • 2019-08-18
      • 1970-01-01
      • 2019-03-21
      • 2021-05-05
      • 2017-12-15
      • 2018-03-27
      相关资源
      最近更新 更多