MusicKit additional properties for Songs and Albums

Hi,

I know MusicKit is in beta, but after having talked to an engineer at a WWDC lab, it seems to be feature complete for now. I really enjoy the framework and it helps wrap the Apple Music API nicely. However, the types it provides are missing some properties that are relevant to any music item (song, album, music video) such as the releaseDate, contentRating, durationInMillis and url.

This is the JSON response from a /tracks relationship of an album:

        "previews": [
          {
            "url": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/e6/84/62/e6846266-2779-4527-902b-0a3b6f73be75/mzaf_18277320986443617976.plus.aac.p.m4a"
          }
        ],
        "artwork": {
          "width": 3000,
          "height": 3000,
          "url": "https://is1-ssl.mzstatic.com/image/thumb/Music124/v4/c4/7a/01/c47a01c2-2b04-a327-12bd-c726ae076c7f/886447823545.jpg/{w}x{h}bb.jpeg",
          "bgColor": "1c1c1c",
          "textColor1": "fafafa",
          "textColor2": "e1e1e1",
          "textColor3": "cdcdcd",
          "textColor4": "b9b9b9"
        },
        "artistName": "Kollegah",
        "url": "https://music.apple.com/de/album/alpha/1477896577?i=1477896820",
        "discNumber": 1,
        "genreNames": [
          "Hip-Hop/Rap",
          "Musik"
        ],
        "durationInMillis": 141827,
        "releaseDate": "2014-05-09",
        "name": "Alpha",
        "isrc": "DEDG61400001",
        "hasLyrics": true,
        "albumName": "King",
        "playParams": {
          "id": "1477896820",
          "kind": "song"
        },
        "trackNumber": 1,
        "composerName": "Kai Engelmann, Phillip Herwig, Alexis Papadimitriou, Daniel Coros, Yunus Cimen & Sadik Kalyon",
        "contentRating": "explicit"
      }

As you can see, the releaseDate, durationInMillis, url, contentRating, etc. are missing from the struct Song : MusicItem in the MusicKit.

I was wondering if we can extend MusicKit as developers in a way to include the releaseDate and other types or are we making a choice between using custom models and custom requests vs. using MusicKit?

Thanks

Answered by Frameworks Engineer in 683111022

Hello @sharedRoutine,

In iOS 15 beta 4, we have exposed a number of new properties in various music item types in MusicKit.

The information you specifically asked for is now available:

I hope this helps.

Best regards,

Hello @sharedRoutine,

Thank you for your feedback.

I wouldn't say MusicKit is feature complete. Rest assured, we are hard at work on trying to complete the picture for MusicKit.

Stay tuned.

Best regards,

Accepted Answer

Hello @sharedRoutine,

In iOS 15 beta 4, we have exposed a number of new properties in various music item types in MusicKit.

The information you specifically asked for is now available:

I hope this helps.

Best regards,

MusicKit additional properties for Songs and Albums
 
 
Q