I am trying to get album art from an MP3 file.
In this case, I use AVAudioPlayer to play the file.
Here is the code I thought would get the album cover:
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 does not contain any image.
I'm a little stuck.
If someone can help by suggesting where / how I can get the cover directly from the ID3 tag, that would be very helpful.
Any help was appreciated.
source share