MusicKit Album Release Data

When printing out an Album, the release date is included:

Album(
  id: "1566393640",
  title: "Aquatic - Single",
  artistName: "Nora En Pure",
  genreNames: [
    "Dance",
    "Music"
  ],
  releaseDate: "2021-06-04",
  isCompilation: false,
  upc: "7640130765399"
)

But it is not mentioned as an instance property here and I cannot identify any way to access it in my project. How can I go about getting access to this attribute via MusicKit?

Thanks! :)

Replies

Hello @cheddarburrito,

Thanks for the feedback. As you can guess from this output, we have been meaning to expose releaseDate as a property of Album, but it didn't quite make it into seed 1.

Please, don't rely on the description you get for fetching properties like this one; such code would be inherently fragile, as there is no strong API contract about the structure of the debugDescription for our music item types.

We'll followup on this, and I encourage you to check again in the next few seeds.

Best regards,

Hello @cheddarburrito,

We have added a releaseDate property to the Album type in iOS 15 beta 3.

I hope this helps.

Best regards,