OK, so I have the full version of my application up and running on the App-Store. Now I\'m working on the lite version; I placed a button in it that supposes to direct the user
Using the itms://
protocol will ensure the link goes directly to the App Store app rather than through Mobile Safari (as you're correctly doing).
Using your app name and app ID will ensure the link goes directly to your app rather than searching for it, which is what happens when you use the path format you have there.
You want your url to look like this:
itms://itunes.apple.com/us/app/its-on-my-way/id334996949?mt=8
except using your app information, of course. You can easily get the properly formatted name and the app id by navigating to your app's page in iTunes and then right-click on you're app's icon where you'll get the option to "Copy Link". Replace the http
with itms
and you're set.
You can also get the appropriate app name and id using Apple's iTunes Link Maker.
If the app you're linking to isn't in the store yet you can get the id from iTunesConnect and, in most cases, figure out the name; mostly it's just using lowercase letters, stripping out punctuation, and replacing spaces with hyphens, though sometimes it can be a bit different. If you have an app with any unusual characters or are not sure how iTunes will change it, check other apps with similar punctuation/characters.
Edited to add
Obviously (from the URL) this link goes to the US App Store link; I'm not sure how it will work internationally.
Further edited to add
You could get the user's current country code via NSLocale
like this:
NSLocale *currentLocale = [NSLocale currentLocale];
NSString *countryCode = [[currentLocale objectForKey:NSLocaleCountryCode] lowercaseString];
Then you could substitute the us
part of the string I used above with this lowercase string, which would often send the user to the correct store (unless there was no store associated with their country code). Your app would have to be in that store, though, and I'm not sure how the name part works: it might be that iTunes wants the app as named in that locale or it might be that it's fine with the English version.
I have used the following - link changed to obscure customer ;-)
NSString *iTunesLink = @"http://itunes.apple.com/gb/app/wired-news-uk/id435728870?mt=8";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
All I do is grab the link via iTunes itself. Of course that means the app you wish to link to already has to exist in iTunes. However I understand it is possible to anticipate a link after creating the app in iTunesConnect - though I haven't had the need to do this yet.