Launch iPhone app from link in email

浪尽此生 提交于 2020-01-12 19:04:53

问题


I've been trying out the URL schemes in the iPhone SDK and I have got my application to launch using a custom URL scheme like "myap://Dosomething" but that is not really practical for what I want. Is it possible to register a scheme somehow that would allow links in emails like "http://www.mydomain.com/" to launch my application, like app store links and youtube links do?


回答1:


If you want the link to be clickable in Mail you have to use an http:// link which will launch Safari. This means you should create a page on a webserver somewhere that return an HTTP 303 redirect (See Other) with your myApp:// url. This should cause Safari to launch your application. If that fails you can try a <meta> redirect, and as a last resort a standard <a href="myApp://">Click me</a> link.




回答2:


To do that you would have to register and host that domain and set it up to redirect to the URL scheme. How to set up the redirect depends on what web server you're running. Why do you think myapp:// is impractical?



来源:https://stackoverflow.com/questions/2228982/launch-iphone-app-from-link-in-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!