我正在創建一個可以使用MPRemoteCommandCenter
控制的iOS應用程序。這工作正常。從MPRemoteCommandCenter丟失「正在播放」狀態
將應用程序AVAudioSession
類別從AVAudioSessionCategoryPlayback
更改爲AVAudioSessionCategoryPlayback, withOptions: .MixWithOthers
時,它將停止接收遠程控制事件。這可以。
但是,當我將該類別更改回AVAudioSessionCategoryPlayback
時,我沒有按預期從MPRemoteCommandCenter
收到事件。
如何收回「正在播放」狀態的我的應用程序?
在http://stackoverflow.com/questions/24625510/switching-avaudiosession-categories-then-retaking-control-of-remote-control-cent的答案並沒有幫助爲'beginReceivingRemoteControlEvents'是棄用「MPRemoteCommandCenter」。 – Henrik