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