且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Universal Link在iOS 13上无法正常工作(未下载AASA)

更新时间:2023-01-01 21:03:38

经过大量测试,我发现以下是适用于iOS12和iOS13的格式. iOS12绝对要求每个details词典条目都包含appIDpaths参数,才能正常工作.另一方面,iOS13期望第一个条目同时包含appIDscomponents.这意味着第一个条目绝对需要包含所有4个参数,以支持自动填充(带有保存密码"提示)和通用链接这两个平台.

After much testing, I found out the following is the format that works for both iOS12 and iOS13. iOS12, absolutely requires every details dictionnary entry to contain the appID and paths parameters to work properly. iOS13 on the other hand expects the first entry to contain both appIDs and components. This means the first entry absolutely needs to contain all 4 parameters to support both platforms for Autofill (with the Save Password prompt) and Universal Links.

具有讽刺意味的是,这种格式没有通过Apple App Search API验证工具,但适用于分支机构之一……FTS!另请注意,将用户名和密码UITextField放在不同的VC上不起作用(您将不会看到Save Password(保存密码)提示).我必须在密码屏幕上添加一个假"用户名UITextField,以便操作系统将其拾取,并且不要将其隐藏,也不要将宽度或高度设置为0px(因此基本上将其设置为1x1px的大小,并使用清晰的文字和背景,用您以前的VC中的用户名填充它.

Ironically, this format does not pass the Apple App Search API Validation Tool, but it does work for the Branch one... FTS! Note also that having your username and password UITextField on different VCs does not work (you will not get the Save Password prompt). I had to add a "fake" username UITextField on our password screen so it got picked up by the OS and DO NOT hide it, nor make either width or height 0px (so basically make it 1x1px in size, with clear text and background and fill it with your username from the previous VC).

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appIDs": [ "ABCDE12345.com.domain.app", "ABCDE12345.com.domain.app2" ],
        "appID": "ABCDE12345.com.domain.app",
        "components": [
          {
            "/": "/documentationsucksforios13",
            "comment": "This documentation is awful"
          }
        ],
        "paths": [ "/documentationsucksforios12" ]
      },
      {
        "appID": "ABCDE12345.com.domain.app2",
        "paths": [ "/validationtoolsdontwork" ]
      }
    ]
  },
  "webcredentials": {
    "apps": [ "ABCDE12345.com.domain.app" ]
  }
}