开发者

Connecting the LITE Version to the FULL Version on App Store

开发者 https://www.devze.com 2023-03-07 14:49 出处:网络
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

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:

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消