【问题标题】:Deep Linking iOS Swift 5深度链接 iOS Swift 5
【发布时间】:2022-01-12 23:38:08
【问题描述】:

我想为我的 ios 应用添加深度链接。 iOS 14 和 Swift 5 !!!

完成:

  1. 为 URL 方案添加了 URL。例如 com.yourdomain
  2. 已添加:https://www.yourdomain.com/.well-known/apple-app-site-association

类似:

    “applinks”: {
        “apps”: [],
        “details”: [
            {
                “appID”: “TEAM_ID.BUNDLE_APP_ID”,
                “paths”: [“*”],
            }
        ]
    }
}
  1. 并在 AppDelegate.swift 文件中添加捕获事件的方法

不起作用,我不知道如何调试它。 请帮助:-)有什么想法吗? 我发现 iOS 13 和 iOS 14 之间发生了一些变化和差异

【问题讨论】:

  • 网址方案和深层链接是相反的。这里可能有些混乱。

标签: ios swift iphone xcode deep-linking


【解决方案1】:

首先,打开 Xcode,进入项目设置 -> 功能。向下滚动到关联域并将其打开。

一旦启用,我们将添加任何实现我们的 apple-app-site-association 资源的 URL,前面是应用链接。在 Domains 部分中,添加一个 applinks:myApp.com。完成后,继续尝试您的应用。

https://medium.com/wolox/ios-deep-linking-url-scheme-vs-universal-links-50abd3802f97

【讨论】:

【解决方案2】:

使用 branch.io,因为我知道它们适用于 iOS 14

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-09-04
    • 1970-01-01
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 2013-10-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多