Same issue here:
ForEach(collections, id:\.objectID) { collection in
CollectionTile(collection: collection)
}
does not work, or intermittently, throwing the error 'Unable to present, Please file a bug'.
I can work around it by changing ForEach into a List but then the UI is not exactly what I want.
Post
Replies
Boosts
Views
Activity
Many thanks for this. Can you also help with how to get a list of library playlists for the user, like you can with the Apple Music API endpoint: https://api.music.apple.com/v1/me/library/playlists?
Following up on this thread, I can successfully load playlists using MusicDataRequest. For example I can see playlist returned with and id of "p.aJe0ME5I3eZQ84d" from my Apple Music account.
Trying your code fetch the tracks of the playlist did not work out of the box. I had to modify it to
var playlistRequest = MusicCatalogResourceRequest<Playlist>(matching: \.id, equalTo: MusicItemID(playlistId)), i.e. wrapping the returned playlist id to a MusicItemID. Is this correct?
Because using the id this way, it results in the following error:
[DataRequesting] Failed to perform MusicDataRequest.Context(
url: https://api.music.apple.com/v1/catalog/nl/playlists/p.aJe0ME5I3eZQ84d?l=en-GB&include=tracks&omit%5Bresource%5D=autos,
currentRetryCounts: [.other: 1]
) with MusicDataRequest.Error(
status: 404,
code: 40400,
title: "Resource Not Found",
detailText: "Resource with requested id was not found",
id: "4B4ETVMCUXDRBAJ5OCLJLAKLSU",
originalResponse: MusicDataResponse(
data: 159 bytes,
urlResponse: <NSHTTPURLResponse: 0x00000002829a78a0>
)
).
What am I doing wrong?
I think using artwork in your app through the MusicKit API is completely fine; I am doing it in my app as well. What is definitely not allowed is using artist artwork in your App Store app page. My app got rejected once because of that and I had to come up with fake album covert artwork. Hope this helps.
Also filed feedback, FB14091781
Sigh....