Is it possible to make a link that would open an app if tapped on an iPhone and a website if on a desktop?

StackOverflow https://stackoverflow.com/questions/20530410

Question

I am wondering if it is possible to make a link that if tapped on (say in iOS Mail), would open up a specific app (I know that part is possible), AND if the very same link were opened up on a regular computer say in Gmail, it would function as a regular web link.

So essentially, two different links in one, depending on the platform you are on.

Where would I start to get something like this going?

Was it helpful?

Solution

I just did it this morning. You need to have your link in the email go to your website. Then on your website check the user-agent and redirect to the app if the user-agent is for iOS and if it is not iOS show the regular web page.

OTHER TIPS

You can't, because you don't have control on which device email is shown. Best approach would be to code (css/html) responsive email template and hide first link(for pc) if screen size is < 600px etc.

More on responsive emails: http://zurb.com/article/1144/a-tutorial-on-responsive-email-templates

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top