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

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?

有帮助吗?

解决方案

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.

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top