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 to the App-Store to the application FULL Version page.
I'm using the [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.com/apps/AppName"]] command.
several issues I would very much appreciate assistance with:
- Is there a better command line for this action? currently it goes (automatically) through several pages till it reaches the relevant page on App-Store. Is there a command line that goes directly to the page I'm directing it to?
- My application's name is combined out of 2 strings (for example "App Name"); currently, when I test it on a device, it doesn't find it while being directed to the App Store and instead it goes to a page where I have a "Search" button and if I click this button it does find the App on the App Store (the command line itself works perfectly; if I enter "Shazam" or any other familiar application's name instead of my AppName it goes to the right page). How should I write it in the command line? "App Name" or "App_Name"? maybe something else?
any assistance would be very much appreciated...
I have used the following - link changed to obscure customer ;-)
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.
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:
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
withitms
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: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.