MPMediaLibrary.default().addItem broken in macOS 13.4 / Catalyst

The following line of code worked fine in macOS 13.3 / Catalyst:

try await MPMediaLibrary.default().addItem(withProductID: "1678639572")

Since the 13.4 update it now throws an error:

The operation couldn’t be completed. (MPErrorDomain error 11.)

Although the Apple Music track with catalog Id 1678639572 does seem to get added to the library regardless.

MPError.errorCode 11 is an undocumented value.

Can someone please advise what error code 11 actually means, and if there's a workaround?

I've raised this as feedback id FB12196635.

MPMediaLibrary.default().addItem broken in macOS 13.4 / Catalyst
 
 
Q