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?
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.
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