MPMediaItemArtwork sometimes returns nil for a specific size

Originator:ldesroziers
Number:rdar://18282124 Date Originated:09/09/2014
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8.0 (12A365)
Classification:UI/Usability Reproducible:Sometimes
 
Summary:
When using an iTunes Match library (with some songs downloaded on device), artworks are taking a lot of times to display, and some of them aren't available at a specific size (smaller ones it seems)
To avoid a lot of memory usage, I query a lot of thumbnail artworks from my library, and display bigger sizes later (when a track is playing for exemple).

Steps to Reproduce:
1. Open the project I attached
2. Run the App on an iOS device which has a fresh iTunes Match library on it
3. The app enumerates all your Albums and calls -representativeItem on each of them
4. The app displays 3 imageViews on screen with 3 different sizes (80, 120, 280)
5. Once the app founds out that an artwork couldn't be found for a specific size, but is available for the other sizes, it stops and pops an alert with more informations about the track MPMediaItemArtwork failed to retrieve the artwork at a specific size. 

(if no alert is being displayed at the end of albums enumeration, there is no error)


Expected Results:
MPMediaItemArtwork should provide an artwork for every sizes (if there's at least one-sized artwork, of course).
If no artwork available for a specific size, should return a greater or lower artwork instead.


Actual Results:
MPMediaItemArtwork does not return artworks for smaller sizes (sometimes)
My app failed at the first album. The 80*80 and 120*120 artworks couldn't be retrieved

Sample Project: http://cl.ly/0B1V3R3u1K39/ArtworkTesting.zip

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!