Apple 关联域和共享 Web 凭据

问题描述 投票:0回答:1

对于我的 iOS 应用程序中的身份验证,我想使用 Apple 共享 Web 凭据功能。

我已在我的网站上放置了关联的域文件。该文件可在路径https://subdomain.domain.com/.well-known/apple-app-site-association下访问,并具有以下内容:

{
  "webcredentials": {
    "apps": [
      "XXXXXXXX.demo.App"
    ]
  }
}

我在 iOS 应用程序中启用了关联域功能,并在其中添加了以下条目:

webcredentials:subdomain.domain.com

现在我构建并启动应用程序并获得登录屏幕。当我在那里输入登录数据并提交时,我收到以下错误:

标识符为 XXXXXXX.demo.App 的应用程序未与域 subdomain.domain.com 关联

iOS应用程序是否使用配置的关联域来查询Web服务器上的文件?我到底错过了什么?

ios xcode credentials associated-domains
1个回答
0
投票

请注意一些要点,以使其发挥作用:

  • 您必须将 XXXXX 替换为您的苹果开发者帐户中的 teamId,其他部分是您的捆绑包标识符。
  • Apple 的内容交付网络在 24 小时内请求您的域的 apple-app-site-association 文件。应用程序安装后,设备大约每周检查一次更新。
  • 您可能必须启用(自动填充凭据提供程序)功能才能在 authFillPassword ui 中使用凭据。
  • 设置属性textContentType,使系统将输入识别为(用户名,电子邮件,密码......等)。

参考资料: https://developer.apple.com/documentation/xcode/supporting-linked-domains#Add-the-linked-domains-entitlement-to-your-app

https://developer.apple.com/documentation/security/password_autofill

© www.soinside.com 2019 - 2024. All rights reserved.