如何解决Flutter iOS 自动填充强密码错误
我收到此错误:
[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,autofillHints: [AutofillHints.newPassword],)
],)
我希望这种情况发生:
解决方法
好的,这花了我一段时间来解决。我使用了 firebase 来做到这一点。
- 使用 Firebase 托管
- 在您的计算机上执行
firebase init
并设置托管 - 在公共文件夹中创建一个名为
.well-known
的文件夹 - 在名为apple-app-site-association的文件夹中添加一个文件 将此设置为您的文件
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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。