Post

Replies

Boosts

Views

Activity

Reply to Media Player Queue Descriptors broken on Mac Catalyst
Thanks for the super quick response @JoeKun. I tried out a few things and some observations: MPMusicPlayerPlayParameters object initialised manually using the method I mentioned or initialised using the new MusicKit APIs results in the exact same object signature. MPMusicPlayerPlayParameters existed well before MusicKit and the way to initialise it has always been manually because all responses were in JSON, I simply used the exact response format given out by official Apple Music API docs. You can check the playParams response format by checking out the response tab here: https://developer.apple.com/documentation/applemusicapi/get_a_catalog_song Even when using MusicKit, a queue set via MPMusicPlayerPlayParametersQueueDescriptor using a dictionary directly from a MusicCatalogResourceRequest exhibits the exact same behavior i.e. it completely fails to do anything on Mac Catalyst. I will attach another sample project showcasing this to the original radar FB9890331. The code provided above works perfectly on iOS. Pt.2 and 3 prove that the way we create instances of MPMusicPlayerPlayParameters is not the actual problem but the problem lies elsewhere and is specific to Catalyst/macOS. The sample code I provided above was just an example of the core issue I'm facing when building a working Mac Catalyst music app i.e. there is just no way to play non-library items reliably using the Media Player framework on Catalyst. I have already provided a sample project via radar FB9890270 showing the issues with MPMusicPlayerStoreQueueDescriptor where in the queue is set correctly in stock Music app (albeit without album arts) but the actual app itself shows the nowPlayingItem and queue as nil. Going slightly off-topic, I'm really happy to see the way actual Apple devs are helping us out now. It goes a long way in instilling confidence to keep working on our apps and motivate us.
Feb ’22