简体   繁体   English

如何调试通用链接

[英]How debug Universal links

I use the cordova plugin "ionic-plugin-deeplinks" (to my knowledge also works with a plain cordova app).我使用cordova插件“ionic-plugin-deeplinks”(据我所知也适用于普通的cordova应用程序)。

On Android, links when clicked let users choice between chrome and my application.在 Android 上,单击链接时用户可以在 chrome 和我的应用程序之间进行选择。 => I suppose that app links works => As I'm able to access window.IonicDeeplink and redirect the user to the right page => 我认为应用程序链接有效 => 因为我可以访问 window.IonicDeeplink 并将用户重定向到正确的页面

I'm not able to have the same behavior on iOS, when I click a link I always get the app open in Safari.我无法在 iOS 上有相同的行为,当我单击链接时,我总是在 Safari 中打开该应用程序。

How can I find clue on issues ?我怎样才能找到问题的线索?

More context:更多背景:

  • apple-app-site-association is got with a HTTP 200 (over https only), it's located in /.well-known/apple-app-site-association : apple-app-site-association带有 HTTP 200(仅通过 https),它位于/.well-known/apple-app-site-association
    • I checked TeamID and BundleID 5 times (at least);我检查了 TeamID 和 BundleID 5 次(至少);
    • with the branch.io validator i get all validations green:使用branch.io 验证器,我将所有验证变为绿色:
      • Your domain is valid (valid DNS).您的域有效(有效的 DNS)。
      • Your file is served over HTTPS.您的文件通过 HTTPS 提供。
      • Your server does not return error status codes greater than 400.您的服务器不会返回大于 400 的错误状态代码。
      • Your file's 'content-type' header was found :)已找到您文件的“内容类型”标头 :)
      • Your JSON is validated.您的 JSON 已通过验证。
    • with the apple validator , I got : "Action required Could not extract required information for Universal Links. Learn how to implement the recommended Universal Links. Error no apps with domain entitlements The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update."使用苹果验证器,我得到: “所需的操作无法提取通用链接所需的信息。了解如何实施推荐的通用链接。错误没有具有域权利的应用程序用于验证深层链接双重身份验证的权利数据来自当前发布的应用的版本。此数据可能需要 48 小时才能更新。” (but some devs said that working app add the same error) what to do with that result? (但一些开发人员说工作应用程序添加了相同的错误)如何处理该结果?
    • when monitoring server's log while installing the app with Xcode I see a request get a HTTP 200 on apple-app-site-association在使用 Xcode 安装应用程序时监视服务器日志时,我看到一个请求在apple-app-site-association上获得 HTTP 200
  • while installing the app with Xcode I got no logs referring to swcd in Xcode (I read here that I should if I had error while installing the app).在使用 Xcode 安装应用程序时,我没有在 Xcode 中获取任何关于 swcd 的日志(我在这里读到,如果我在安装应用程序时出错,我应该这样做)。 Is a successful installation silent?成功的安装是静默的吗?
  • I followed that guide to setup entitlements, but some things feel odd with it:我按照该指南设置权利,但有些事情感觉很奇怪:
    • Unlike the snapshot in the guide, I didn't found any *.entitlements file in my project.与指南中的快照不同,我没有在我的项目中找到任何*.entitlements文件。 Should I have one with cordova?我应该有一个cordova吗? (my xCode seems to remember my setting though). (不过,我的 xCode 似乎记得我的设置)。 Is it possible to check that installed app get entitlements?是否可以检查已安装的应用程序是否获得权利?
    • I did set my domain in Xcode like this: applinks:mydomain.com and the switch is ON.我确实在 Xcode 中设置了我的域,如下所示: applinks:mydomain.com并且开关已打开。 But I never uploaded any thing from my local dev environment to apple services.但我从未将本地开发环境中的任何内容上传到苹果服务。 Should I have?我应该有吗? If yes, how ?如果是,如何?

My current interrogations are highlighted but any explanations on any lack of understanding will be more than welcome!!!我目前的审讯被突出显示,但任何对任何缺乏理解的解释都将非常受欢迎!!!

Until then I started a verification for testFlight looking for more info.在那之前,我开始对 testFlight 进行验证以寻找更多信息。

while installing the app with Xcode I got no logs referring to swcd in xCode在使用 Xcode 安装应用程序时,我没有在 xCode 中获取任何关于 swcd 的日志

I implemented Universal Links manually, but situation was similar.我手动实现了通用链接,但情况类似。 Particularly I mentioned empty swcd process log while installing the app, and it turned out that most likely iOS didn't even try to download apple-app-site-association file, like if responsible process wasn't run.特别是我在安装应用程序时提到了空的swcd进程日志,结果很可能是 iOS 甚至没有尝试下载apple-app-site-association文件,就像没有运行负责的进程一样。 In my case device restart helped and deep-linking began to work.在我的情况下,设备重启有所帮助,深度链接开始起作用。

Thus I think restarting device is one another step in troubleshooting when you are sure about all your setup.因此,我认为当您确定所有设置时,重新启动设备是故障排除的又一步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM