Music preview from iTunes music store in iOS app [closed]

我怕爱的太早我们不能终老 提交于 2019-11-29 18:57:52

Yes, you can do this. I have a published app which does this.

You need to get the URL's to the music preview files. One way is via the iTunes search API's. Another is via the Apple Enterprise Partner Feed.

http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

http://www.apple.com/itunes/affiliates/resources/documentation/itunes-enterprise-partner-feed.html

Once you have the URL, you can feed it to MPMoviePlayerController for progressive-download/playback. Or you can download the file yourself and feed it into AVAudioPlayer or your own playback infrastructure.

Please check the Apple guidelines for using preview links. I believe you must be an affiliate, and you must be advertising the sale of the associated song. I also believe (please check) that Apple also permits affiliates to place these preview links on web pages, alongside affiliate links to purchase the songs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!