Just send someone to the link. This following excerpt is directly from the iPhone OS Programming Guide:
Quote:
You can link to the iTunes music store from your web content or launch iTunes from a native application
using a URL. The iTunes URL is complicated to construct, so you create it using an online tool called iTunes
Link Maker. The tool allows you to select a country destination and media type, and then search by song,
album, or artist. After you select the item you want to link to, it generates the corresponding URL. For example,
this HTML fragment links to a song:
<a
href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=156093464&id=156093462&s=143441">
<img height="15" width="61" alt="Randy Newman - Toy Story
- You've Got a Friend In Me"
src="http://ax.phobos.apple.com.edgesuite.net/images/
badgeitunes61x15dark.gif"></img>
</a>
Go to iTunes Link Maker FAQ for more information on creating iTunes links.
I tried this, putting a link (created with the LinkMaker) in the HTML which is loaded in a UIWebView, but I just get a bunch of text in the WebView instead of being directed to iTunes. What is the code you need to have your app automatically open iTunes?
I would like to make a smoother transition though. I've seen other apps open iTunes right away. On mine, I click the link (which is displayed on an html page in a UIWebView), you see Safari open to a blank page, then it zooms out to multi-window mode, then iTunes finally opens. How do you bypass the Safari-opening steps and go straight to iTunes?