How to get "Purchase Date" or "Date Added" from MPMediaItems in iPod Library
Since users are downloading new songs to their iPod Music library from the iTunes Store, I would like to programmatically list these songs in a table. Is it possible to get "Date Added" or "Date Purchased" from MPMediaItemCollection? I see there are property keys like play counter and last date. I know the data exists because it can be viewed in iTunes, but I cannot find it. Any suggestions on where to find this or how to get it?
source to share
As you can see in Apple's documentation for MPMediaItem http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMediaItem_ClassReference/Reference/Reference.html#//apple_ref/occ/cl/MPMediaItem you get access to all properties via enumerateValuesForProperties:usingBlock:
or valueForProperty:
, but no property exists for date or purchase information.
This does not mean that the data is not stored somewhere (it certainly is): it means that you cannot access this information through public APIs, possibly for privacy concerns.
I don't know at all if there is a way to get this information through some private API calls, but if it exists, you cannot use it for AppStore apps because it will cause a failure in the browsing process.
source to share