Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display iOS app's deep links on email as links

I'm using deep linking for my react-native app to let user click on a link to open my app and perform some actions.

My problem here is when I send email (using <a href=""> tags and send the body as HTML) to user with these deep links (e.g myapp://profile?userId=123456), they are recognized as text instead of links by email clients, so at the moment my app users can't press on the "links" to open the app.

like image 815
sonlexqt Avatar asked Dec 17 '22 20:12

sonlexqt


1 Answers

I did some research and it turns out email clients like Gmail don't like links with abnormal protocol such as myapp:// and they will strip out those links from href attribute. My solution is to use another link which will eventually redirect the user to the deep link, for example: https://api.myapp.com/redirect?url={encoded-deep-link}

like image 76
sonlexqt Avatar answered Jan 09 '23 01:01

sonlexqt