tags:

views:

116

answers:

1

I'm making an iPhone app for a band, which lists songs for the band. When the user touches a button next to a song, I want to open iTunes and display that song. Currently I'm using this code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString: linkLocation]]; where linkLocation is a link to the song in iTunes. This works.

The problem I have is finding the link for a song. The links I get from the latest version of iTunes are different to the links I used to get in the previous version (by clicking on the dropdown arrow next to a song, and choosing "copy link"). If I use the link from the new version of iTunes, I get the error "Your request could not be completed" on my iPhone when I try to open that link through my app.

I've also tried using the Apple "itmsLinkMaker" site, and that doesn't work either.

+1  A: 

Well it turns out Apple's itmsLinkMaker site does work - I must have been copying the links wrong.

Here's the link in case anyone else comes looking: http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/itmsLinkMaker

Squirtle