c# - 无法使用 SendGrid 在 iOS 上打开电子邮件中的通用链接

标签 c# ios angularjs ionic-framework sendgrid

我目前有 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/

相关文章:

Visual Studio 中的 C# 脚本突然中途停止而没有错误

ios - 在 iOS 8 中下载时出现 kCFStreamErrorDomainSSL 错误

javascript - 我对从 Web api 到 Angular js 和 html 的 get 方法有疑问

c# - 如何在 .NET Webforms 中使用 Jquery AJAX 将数据发布到 MySQL

c# - 如何在 Swagger UI 中使用 Dictionary 参数?

c# - RijndaelManaged key 长度与 AES[ key 长度] 相同吗?

php - 将php json文件导入swift

ios - iOS:UIToolbar setBackgroundImage无法正常工作

html - 登录应用程序 - 单击提交按钮重定向到另一个页面

javascript - Angular 2 rc.1 和 PhpStorm 2016.1.2 未解析的变量