Hi! I'm developing a music app. I want to get the songs from different playlists to play a preview and later the user can buy them on iTunes. I'm getting the most played playlist via rss.applemarketingtools.com but I cant get the songs that contain the playlist. I tried to use Music Kit but I have to support iOS14 and MusicKit is not available. Anyone knows any api or someway to do it. Some apps like Instories got this. Thanks
Apple Music playlist songs without Music Kit
You can use the Apple Music API in this case. For your needs, something like fetching multiple songs by ID endpoint. Then, you can decode the response yourself, and inside it, you will find the preview URL under previews
object.
Then, you can use AVPlayer
to play that preview song; I guess it is for 30 seconds. Based on that, the user can buy them on iTunes.
Let me know if that works for you!