Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have interesting question. It is possible to play music preview from iTunes music store in iOS app? How to do that? I need your help.

like image 721
Tunyk Pavel Avatar asked Mar 15 '11 19:03

Tunyk Pavel


People also ask

Can you still preview songs on iTunes?

You can access iTunes Preview through Apple's iTunes Charts page and then click on any album or artist to get the track listing. Hover over the track number and you'll see a little play icon show up—give it a click to play the sample.

How do I stop music from turning off when I open an app?

Turn off Power saving mode. Open Settings, tap Battery and device care, and then tap Battery. Turn off Power saving by tapping the switch.

Why Apple Music appears on lock screen?

' Locate 'Today View and Search' and tap on the toggle to turn it off. Another method that could fix the Apple Music lock screen error is turning off notifications for the app. To do this, head to Settings, tap 'Notifications,' scroll down to locate Apple Music, and disable the 'Allow Notifications' toggle for the app.


1 Answers

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.

like image 108
TomSwift Avatar answered Oct 19 '22 09:10

TomSwift