I am testing my app with Apple Music, my app grabs the current playing song and displays relevant information on it.
One of the steps is to get the album artwork, however I find that when the song is playing from Apple Music it does not contain any artwork.
Here is my code, the first if condition is ran, which suggests that the artwork is initialized, however I get no image.
Does anyone know how I can get the artwork when the song is being played though Apple Music?
song
is of type MPMediaItem
CGSize artworkImageViewSize = cell.albumImage.bounds.size;
MPMediaItemArtwork *artwork = [song valueForProperty:MPMediaItemPropertyArtwork];
if (artwork)
{
cell.albumImage.image = [artwork imageWithSize:artworkImageViewSize];
}
else
{
cell.albumImage.image = [UIImage imageNamed:@"noArtwork"];
}
Whenever I try to print artwork.bounds
I get back null.