I'm about to release an iPhone app. Part of its functionality is that the user can send some content of the app by email (amazing!).
Now, by default, I'm inserting some text in the body of the newly composed message, including a link to the App Store, enabling the person who receives the message to download my app (revolutionary!).
So, I figured out, that the URL of an app is:
http://itunes.apple.com/app/id[your apple app id here]
which is very convenient, because you can actually include the url in your app, even before the app actually exists. (Your apple app id is indicated in itunesconnect).
But, I want this to even look better, by using the recently introduced itun.es URL shortening protocol.
I don't know nor understand too much about URL Shorteners. I just want to be able to express an iTunes link of a not yet existing app that already has an ID in an itun.es way.
Does anybody know the algorithm?
I don't know of any quick way to do it, but it is possible. The clumsy way to extract it is to go to the app in the iTunes app store and choose "Share on Twitter" from the dropdown menu next to the price. This will open a link in your browser. The itun.es URL is in the query string of the link, though it's URL-encoded and initially difficult to see. For example, here's the link for the iPad Pages app:
The shortened app identifier is just after "itun.es%252F", beginning with "i" and continuing up to the next percent sign. Pages has the identifier "i6M97N", so the final URL is just: