iOS deep linking is stripped out in Gmail

亡梦爱人 提交于 2020-06-10 02:25:49

问题


I'm trying to send an email with deep linking to my iOS app, using myapp:// format to open it up from email. It works (i.e. tapping on it opens the app) in any iOS mail client (Mail, Mailbox, etc.) but not in Gmail app (or even web), that strips it out leaving text only. Does anyone has a solution/alternative beside creating a web link that redirects then from browser to app?


回答1:


Nope, unfortunately Gmail detects non-http/https protocols in links and strips the anchor () tag (so using data: or javascript: to perform a redirect is out too).

If/When Google implements Actions on Gmail for iOS/Android, those may work (https://developers.google.com/gmail/actions/actions/actions-overview), but as of now, they are not rendered on native mobile clients.




回答2:


You can create a server with a regular endpoint that will redirect to the "special" myapp:// link.

If you are running Node + Express, here's an example of a middleware that does exactly that:

https://github.com/mderazon/node-deeplink



来源:https://stackoverflow.com/questions/23575553/ios-deep-linking-is-stripped-out-in-gmail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!