laaa
laaa

Reputation: 21

Linking to my apps on the App Store

I want to create button that, when pressed, takes the user into the App Store and all my apps are shown.

At the moment the code is

-(IBAction)goReviewTwo:(id)sender; {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.com/apps/lifevisionstudios"]];
}

But that doesn't work. Any ideas on how to do it?

Upvotes: 2

Views: 2590

Answers (4)

Matthew Frederick
Matthew Frederick

Reputation: 22305

Your URL isn't correct. Apple's iTunes Link Maker is the easiest and best way to get the authoritative link to your apps, including for App Stores in various countries.

You can also get a link to a page with all of your company's apps the same way, which seems to be what you're looking for. In the Link Maker your company is referred to as the Artist.

Lastly, rather than using http you should use itms, which will send the user directly to the App Store app rather than routing them through a blank Mobile Safari page first:

itms://itunes.apple.com/us/artist/appname/id?uo=4

Edited to add

As noted in Rab's answer, if you remove the /us it should automatically go to the user's local App Store. It turns out that you also need to remove the query string (?uo=4) that iTunes and the Link Maker generate:

itms://itunes.apple.com/artist/appname/

Upvotes: 3

Lefteris
Lefteris

Reputation: 14687

You can link to the App Store with a specific query, like your iTunes Name.

This works:

NSURL *appStoreUrl = [NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&submit=media&term=Anoxy%20Software"];
[[UIApplication sharedApplication] openURL:appStoreUrl];

Upvotes: 0

Rab
Rab

Reputation: 2836

That should look like itms://itunes.apple.com/us/artist/your-name-here/id101010101 . That's your artist page, and shows your various apps. Take off the /us/ and it should choose based on the user's location. Use the link maker mentioned earlier to specify another country's app store (it will swap in /kr/ for Korea, etc.).

Upvotes: 0

zpasternack
zpasternack

Reputation: 17898

Just find that page in iTunes, right click the link and choose "Copy Link". Paste it into your code. In your case, I think it would be:

-(IBAction)goReviewTwo:(id)sender
{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/us/artist/lifevision-studios/id415139916"]];
}

Upvotes: 1

Related Questions