Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

\[MediaRemote\] Error Operation requires a client callback to have been registered. requesting playback queue

Tags:

ios

swift

I'm currently learning Swift and I am creating an app for a webradio.

I get an error when calling this code :

MPNowPlayingInfoCenter.default().nowPlayingInfo = [
    MPMediaItemPropertyArtist: currentTrack.artist,
    MPMediaItemPropertyTitle: currentTrack.title,
    MPMediaItemPropertyArtwork: albumArtwork,
    MPNowPlayingInfoPropertyIsLiveStream: 1.0,
    MPNowPlayingInfoPropertyMediaType: 1.0,
    MPNowPlayingInfoPropertyPlaybackQueueIndex: 0,
    MPNowPlayingInfoPropertyPlaybackQueueCount: 0
]

Here's the error :

[MediaRemote] Error Operation requires a client callback to have been registered. requesting playback queue

Does anyone knows why? I'm French so I don't correctly understand this error but what I can understand is that something could be missing? If yes, what?

Thanks to all for helping!

like image 273
Did' Avatar asked Sep 16 '17 20:09

Did'


1 Answers

I opened a Technical Support Incident with Apple's developer teams and they replied to me :

Hello Didier,

The engineering team came back and said that the fact you are seeing those log messages is actually a bug in the system framework and do not mean you are incorrectly using the MPNowPlayingInfoCenter API. You should use the MPRemoteCommandSample sample code project as a reference when updating your application as it highlights the engineering recommended best practices when using the MPNowPlayingInfoCenter APIs.

Best Regards,

Developer Technical Support Apple Worldwide Developer Relations

like image 64
Did' Avatar answered Oct 05 '22 19:10

Did'