Apple’s Affiliate Program Newsletter has started promoting a new Apple Music API, which the Cupertino company introduced alongside iOS 9.3. With it, third-party developers can implement in their apps interesting functionality for Apple Music subscribers, including playing tracks, adding songs to a user’s library and queuing up tracks for playback.
Supported apps can also see if a user is currently a member, in which country the users account is based and provide other features for members of Apple Music.
“We are excited to announce that Apple Music API is now available on iOS 9.3,” writes Apple. The API lets developers directly control Apple Music playback for paying members, among other features, and supports these capabilities:
- Developers can see if a user is currently a member
- Developers can see which country the users account is based
- Developers can queue up the next song or songs based on a song ID for playback
- Developers can inspect playlists already in My Music or create a new playlists with a title and description
The company argues that integrating these features in third-party apps provides “a superior user experience”. As you might have suspected, certain limitations apply.
For instance, apps using the Apple Music API that trigger playback without explicit user action will be rejected, as will be those who do not expose and respect iOS’s standard media controls such as play, pause and skip.
It would seem that some apps have already implemented the Apple Music API.
Shazam, for instance, pushed an update to its iOS app last month which brought out the ability to add songs to an Apple Music playlist. As depicted on the screenshots below courtesy of MacRumors, after connecting your Apple Music account in Shazam’s settings, any song identified on the service can be added to your Apple Music playlist by tapping the plus icon in the upper right of the app.
Songs added this way appear inside a playlist on Apple Music, titled My Shazam Tracks. In addition to adding Shazamed songs to a playlist, the app also supports playing any Apple Music song in full, without leaving the app.
Features of the Apple Music API are described in Apple’s developer documentation for iOS 9.3 on the Dev Center. App developers can also read more about the API’s features on a new Apple Music Best Practices webpage and check out a new Apple Music section in the official App Store Review Guidelines.