Open iPhone App from an Email Link

P.M. picture P.M. · Aug 2, 2012 · Viewed 7.2k times · Source

I've working on a program where an email is sent to a user, and a link to open the iPhone app is embedded in the email. The problem is that when the user clicks the link to open the app, mail has stripped out the colon, so the link no longer works!

The link being created basically looks like this:

@"<BR><BR><BR><A HREF=\"http://myApp://\">Open App</A>"

But the link, when clicked in the email, opens this in the browser instead:

myApp//

with no colon, so the app doesn't launch and the browser says it can't find the page.

Any ideas how to fix this? Thanks!

Answer

hypercrypt picture hypercrypt · Aug 3, 2012

It just should be:

@"<BR><BR><BR><A HREF=\"myApp://\">Open App</A>"

As a workaround for custom urls being blocked by gmail, what you could do is set up something like http://myapp.mydomain.com/ up do redirect to myapp://... That way it'll look like a normal domain but open your app. On the plus you will be able to see how many people click your link, though on the down side it'll pop via Safari first.