I'm trying to get the album artwork from a MP3 file.
In this case I use AVAudioPlayer
to play the file.
Here's the code that I thought would get the album artwork:
MPMusicPlayerController *controller = [MPMusicPlayerController applicationMusicPlayer];
MPMediaItem *current = controller.nowPlayingItem;
MPMediaItemArtwork *artwork = [current valueForProperty:MPMediaItemPropertyArtwork];
UIImage *artwork2 = [artwork imageWithSize:artwork.bounds.size];
[artworkView setImage:artwork2];
However artworkView
doesn't contain any image whatsoever.
I'm a little bit stuck.
If any one could help by providing suggestions to where/how I can get the artwork directly from the ID3 tag, that would be of great use.
Any help appreciated.
You have to use enumerateValuesForProperties here is a sample: