I would like to open a link to the iTunes Storefront so that a user can browse the store. In the iPhone Music app, you can click on the "Store" button and get redirected to the music store front. From there, a user can browse the store. I would like to be able to do the same thing, but I don't know the url.
I've tried the obvious link using the following code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/"]];
but this gives an error stating that the address in invalid. Using phobos.apple.com doesn't give an error, but it doesn't bring anything up in the browser.
If this is possible, then I would preferably like to use an iTunes affiliate link so that I get credit for a purchased song. Is that possible?