iPhoneDev
iPhoneDev

Reputation: 421

iOS deep linking is stripped out in Gmail

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?

Upvotes: 36

Views: 21038

Answers (2)

Michael
Michael

Reputation: 22937

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

Upvotes: 4

jlturner
jlturner

Reputation: 301

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.

Upvotes: 30

Related Questions