iOS11 加上下面这个些代码
try! AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: [])
try! AVAudioSession.sharedInstance().setActive(true)
截图
image.png*参考链接(英)
*https://stackoverflow.com/questions/41264141/xcode-swift-3-lock-screen-remote-control-not-working
*参考链接(中)
*http://www.itstrike.cn/Question/ae1fb577-806a-4d8f-ab3e-17fa76f8c42f.html
网友评论