With iOS 9.3 also came a new Apple Music API, and Apple on Thursday released more information on the API, which allows developers to offer expanded Apple Music functionality in their apps.
Developers can use the following features in their apps:
- 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 (see App Store Review Guidelines for limitation)
The Apple Music API is what developers of apps like Shazam use to accomplish tasks like adding songs to Apple Music playlists form directly within their own apps.
Apple has also launched an Apple Music Best Practices webpage for developers, laying out guidelines for using the Apple Music API. Restrictions include:
Content and Intellectual Property Rights
- 8.6 Apps that include the ability to save or download music or video content from third party sources (e.g. Apple Music, YouTube, SoundCloud, Vimeo, etc) without explicit authorization from those sources will be rejected
- 11.8 Apps that use IAP to purchase access to built-in capabilities provided by iOS, watchOS, and tvOS, such as the camera or the gyroscope, or Apple-branded peripherals, such as Apple Pencil or Apple Keyboard, or Apple services, such as Apple Music access or iCloud storage, will be rejected
- 30.1 Apps using the Apple Music API that trigger playback without explicit user action will be rejected
- 30.2 Apps using the Apple Music API must expose and respect standard media controls such as “play,” pause,” and “skip.”
- 30.3 Apps using the Apple Music API may not require payment or otherwise monetize access to the Apple Music service (e.g. in-app purchase, advertising, requesting user info)
The page also offers technical documentation for using the Apple Music API, as well as guidelines on how to refer to Apple Music and how to portray the service from within apps.