I have be trying to use the sample code project associated with WWDC21 session 10294: Meet MusicKit for Swift, with Catalyst.
The apps works on mac correctly excepted the playback and the barcode scanning (that is out of my scope)
The following message is displayed continuously:
MusicAlbums[30849:533531] [SDKPlayback] Failed to obtain synchronousRemoteObject: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.Music.MPMusicPlayerApplicationControllerInternal was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.Music.MPMusicPlayerApplicationControllerInternal was invalidated: failed at lookup with error 3 - No such process.}
Before diving deeper i wanted to know if some of you have been able to play music via MusicKit with Mac catalyst?
The sample code uses an ApplicationMusicPlayer.shared
that is not available directly on macOS. (In fact none of the Music players are available)
Would you recommend another approach to provide MusicKit playback on mac os ?
Hello @bpereiradasilva and @talking small,
Thank you very much for your feedback about issues with ApplicationMusicPlayer in a Mac Catalyst app.
Bringing ApplicationMusicPlayer and SystemMusicPlayer to macOS does present some significant engineering challenges for us, which is why we have yet to enable support for this API on macOS.
For Mac Catalyst specifically, our early tests of these APIs seemed promising, so we initially didn't see any reason to restrict availability of these APIs for that environment. But evidently, we need to keep investigating issues like the ones you have uncovered to make these APIs work reliably in Mac Catalyst apps.
We will keep investigating those issues.
Best regards,