I have an audio streaming app which plays live streams using AVPlayer. Everything works as intended and in order to support a good user experience, I set the MPNowPlayingInfoCenter's nowPlayingInfo property with the title, artist and artwork - here is a small snippet:
func updateNowPlayingView(withSong song: Song)
{
let songImage = song.getSongImageAsUIImage()
let artwork = MPMediaItemArtwork(boundsSize: songImage.size) { size -> UIImage in
let resizedImage = songImage.imageWith(newSize: size)
return resizedImage
}
MPNowPlayingInfoCenter.default().nowPlayingInfo = [MPMediaItemPropertyTitle: song.getSongName(),
MPMediaItemPropertyArtist: song.getSongArtist(),
MPNowPlayingInfoPropertyIsLiveStream: true,
MPMediaItemPropertyArtwork: artwork]
}
This function is called in the CarPlay Scene delegate and it is called in my AVPlayer sub class for my iOS app and I successfully see the correct meta data in the Command Centre, Lock Screen and Car Play.
For some reason, the artwork does not get displayed in my Apple Watch's Now Playing App
Seems like it is setting the default / placeholder music icon image.
However, when I play the Apple Music App, I can see they set the Now Playing artwork properly
So what am I doing wrong that my artwork does not get set for Apple Watch ?
Am I setting it from the wrong place in my code base ?
Or do I need to keep an Apple Watch app / Extension / Scene like CarPlay to send NowPlaying data to the Apple Watch Now Playing app ?
Thanks for your time