How to launch App Store from my iPhone application?
8 Comments 23rd FEB 2009 | Posted by Ivan Kalaica in iPhone dev

This is easy. Just follow the steps below and you will be over in less then minute.
- Launch iTunes on your Mac.
- Search for the item you want to link to.
- Right-click or control-click on the item’s name in iTunes, then choose “Copy iTunes Store URL” from the pop-up menu.

- The returned URL is an itunes.apple.com link. However, iPhone requires phobos URLs for direct linking to the App Store.
- Therefore, you must replace itunes with phobos in the returned URL.
- Open the modified URL using an NSURL object and the -[UIApplication openURL] method.
- (IBAction)appStoreLink {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=301349397&mt=8"]];
}
Now when you press button linked with appStoreLink IBAction, App Store application will open and you will see Divine Office application. That’s all.
To post code in comments, place your code inside [code] and [/code] tags.


















March 20th, 2009 at 22:16
thanks. i really needed this. 45 mins before i leave the office too. haha cutting it close
thanks again.
March 25th, 2009 at 2:30
And if you have an iTunes affiliate account, here’s how to pipe through your LinkShare link to the app.
http://www.alexcurylo.com/blog/2009/03/06/snippet-app-store-links/
July 9th, 2009 at 8:55
Your welcome!
July 9th, 2009 at 8:57
Interesting post Alex.
August 3rd, 2010 at 5:31
From within my app… how would I jump directly to “all apps by this author”?
August 20th, 2010 at 6:19
When I do right-click on my items in iTunes I am getting only “Open Link and Copy Link” but not “Copy iTunes Store Link”. So can you tell me how do i get the correct URL to launch app store from my application.
Thanks in advance.
Regards,
V.Karuna.
August 26th, 2010 at 8:44
@Karuna
if you don’t see “Copy iTunes Store Link” then use “Copy Link” .
There is one Id in this link.
just replace that id(301349397) in following link. It works only in device.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=301349397&;amp;amp;amp;amp;mt=8"]];
August 31st, 2010 at 2:07
Any answer to:
From within my app… how would I jump directly to “all apps by this author”?