我目前有 Ionic Plugin Deeplink从我的网页导航时为 iOS 工作。因此,如果用户在其移动设备上单击 Safari 中的链接,一切都会按预期进行,并且我的应用程序会启动。但是,我试图在从我的服务器发送的电子邮件中使用相同的链接,但无法正常工作。一开始我只是在我的 SendGridMessage 的实例化上设置一个属性来禁用点击跟踪,然后更进一步在 SendGrid 站点的所有电子邮件的实际设置上禁用它。仍然没有任何效果。
当
- 我设置了
href="myApp://myLocation"
- 我设置了
href="myApp://myLocation"
和data-saferedirecturl="myApp://myLocation"
如果我只设置 data-saferedirecturl
Safari 会打开,但我收到:
"Safari cannot open the page because the address is invalid"
我还需要做什么才能让应用程序从电子邮件中打开?
更新
我现在已经连接了 Android,它也可以在我的网站上运行。它也适用于来自 Hotmail 的电子邮件,但不适用于我的 Gmail。尽管当我检查 Gmail 中的元素时它是同一封电子邮件,但我没有看到 href...。这是我的测试的总结:
来自 Hotmail 的 Android:
- 与 href 一起工作
来自 Gmail 的 Android:
- 不适用于 href,href 和 data-saferedirecturl,或仅 data-saferedirecturl
来自 Hotmail 或 Gmail 的 iOS:
- 不适用于 href、href 和 data-saferedirecturl,或者仅适用于 data-saferedirecturl。
最佳答案
我终于意识到我的问题可能与 SendGrid 或插件无关,而与 Gmail 本身有关。我在上面找不到太多东西,但是我终于遇到了以下 Apps Flyer site在限制的底部说明:
Gmail and Google Inbox apps do not handle Universal Links properly, they do not open the apps. As a result, you are unable to open any app using universal links in these apps. As a workaround, you should use the iOS native mail application.
现在我只是从网站链接,因为它总是有效,稍后会转回电子邮件。
关于c# - 无法使用 SendGrid 在 iOS 上打开电子邮件中的通用链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38852830/