Iam trying to show command center in lock screen and not woking for me, i see the code from this tutorial, and write the same code but also not working https://github.com/lukagabric/LGAudioPlayerLockScreen
this is the code
var nowPlayingInfo = [MPMediaItemPropertyTitle: currentPlaybackItem.trackName,
MPMediaItemPropertyAlbumTitle: currentPlaybackItem.albumName,
MPMediaItemPropertyArtist: currentPlaybackItem.artistName,
MPMediaItemPropertyPlaybackDuration: audioPlayer.duration,
MPNowPlayingInfoPropertyPlaybackRate: NSNumber(value: 1.0 as Float)] as [String : Any]
if let image = UIImage(named: currentPlaybackItem.albumImageName) {
nowPlayingInfo[MPMediaItemPropertyArtwork] = MPMediaItemArtwork(image: image)
}
self.nowPlayingInfoCenter.nowPlayingInfo = nowPlayingInfo
Any one can help