开发者

Link to an iTunes song / album from iPhone app

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 c开发者_开发技巧ode: [[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.


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


Previous answer is super old. Apple doesn't support those links anymore.

To create a link that would always work just use iTunes Link Maker. Search for the app there and copy the link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜