0

I am working on developing a music player app. If the user has no audiobooks or podcasts, I am showing a button, which takes user to iTunes store just like it happens in the native music player app.

I looked at the url scheme to open the iTunes Store app in the developers guide and it looks like this:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=156093464&id=156093462&s=143441"]];

what it does is, it open the iTunes store with that specific album, I don't want t open the store with a specific album. So I tried removing the album params as:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?"]];

but with this, I get an alert that your request could not be completed, maybe because iTunes store can not find any album.

So is there anyway I can open the iTunes Store without passing album details, or maybe opening the search tab of iTunes Store

Manish Ahuja
  • 4,509
  • 3
  • 28
  • 35

1 Answers1

1

It seems that you can just do the following to launch the 'Music' tab of the iTunes app:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString@"http://itunes.apple.com"]];
Thomas Denney
  • 1,578
  • 2
  • 15
  • 25
  • Thanks Programming Thomas. Actually I wanted to open up Podcast/Audiobooks tab, but your answer helped me in getting there.. so what I did was changed the urlstring to http://itunes.apple.com/podcasts and http://itunes.apple.com/audiobooks and it worked like charm! Thanks :) – Manish Ahuja Jun 01 '12 at 19:54