MusicAlbums simulator recommendation

Hi,

MusicKit is a particularly good example for teaching aspects of async coding. The API does many things very nicely.

It would be nice if developers could access their Music libraries in the simulator as that would make this API a great teaching tool. Requiring new devs to deploy an app to a device in a workshop is a bit much for some.

I have no idea if this is something you can practically enable - but I thought it was worth suggesting.

Thanks,

Daniel

Replies

Hello @dimsumthinking,

Thank you for the suggestion.

I couldn’t agree with you more on this point. However, supporting MusicKit in the simulator presents several significant technical challenges.

That said, we are actively investigating this already.

Best regards,

  • Even if you can't support MusicKit in the simulator, could you provide a way to get "artificial" data? Placeholder albums, or something? As it is I'm having to write a shim layer between MusicKit and the rest of my app, because otherwise unit testing and SwiftUI previews are just impossible.

Add a Comment

Hello @dimsumthinking,

I'm happy to report that we have made some small improvements in MusicKit's support for the simulator environment.

Provided that you upgrade your Mac to macOS Ventura, you should be able to use a subset of the functionality of MusicKit in the simulator.

Specifically, requests that do not require user authentication behind the scenes work, such as:

However, other requests such as those to load personal recommendations or recently played items are still unavailable in the simulator, as those do require user authentication.

I hope this helps.

Best regards,