1

My app plays audios in the background I am updating the MPNowPlayingInfoCenter to show the Audio's Info in Control Center.

All was working fine on iOS 10, but now when I updated my iPhone to iOS 11 beta2 and play the audio in my app then control center's play/pause button and the next/previous buttons for music are not working, however, the control center is showing Audio's name in control center.

Below is my code I use to update control center

NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       self.audioName, MPMediaItemPropertyTitle,
                                       [NSNumber numberWithFloat:self.playbackRate], MPNowPlayingInfoPropertyPlaybackRate,
                                       [NSNumber numberWithFloat:duration], MPMediaItemPropertyPlaybackDuration,
                                       [NSNumber numberWithFloat:progress], MPNowPlayingInfoPropertyElapsedPlaybackTime,
                                       nil];

Can someone tell how can I fix this bug of Control Center? Or this is the bug in iOS?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Abuzar Amin
  • 1,981
  • 1
  • 19
  • 33

1 Answers1

0

I had problems with beta 2 to use the control center with the Music.app But it's fixed with the beta 3. My thinking is that it was an iOS bug. You should update to beta 3 and see if it solve your bug !

Dean
  • 1,512
  • 13
  • 28