How to launch App Store from my iPhone application?

8 Comments 23rd FEB 2009 | Posted by Ivan Kalaica in iPhone dev

How to launch App Store from my iPhone application?

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.
    itunes_link1
  • 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.

If you like what you read, please share it.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Yahoo! Bookmarks
  • Reddit
  • Technorati
  • Twitter
  • StumbleUpon
  • LinkedIn
  • Netvibes
  • NewsVine
  • Sphinn
  • Tumblr
  • Posterous

To post code in comments, place your code inside [code] and [/code] tags.

There are 8 comments (Add Yours +)

  • thanks. i really needed this. 45 mins before i leave the office too. haha cutting it close :)

    thanks again.

  • 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/

  • Ivan Kalaica Says

    Your welcome!

  • Ivan Kalaica Says

    Interesting post Alex. :-)

  • From within my app… how would I jump directly to “all apps by this author”?

  • 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.

  • @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"]];

  • Robert Wohnoutka Says

    Any answer to:
    From within my app… how would I jump directly to “all apps by this author”?

Leave a Comment

Please wrap all source codes with [code][/code] tags.
Magento Design and Development | Magento SEO | iPhone Application Development Web Application Development with ZEND | WordPress Ecommerce | WordPress development
Sitemap

Inchoo - webappsolutions | 2009