MusicKit
MusicKit lets users play Apple Music and their local music library from your app or website. When users provide permission to access their Apple Music account, they can use your app or website to create playlists, add songs to their library, and play any of the millions of songs in the Apple Music catalog. If your app detects that the user is not yet an Apple Music member, you can offer a trial membership from within your app.