The iTunes Library framework provides facilities for retrieving the properties of media items in a user’s iTunes library.
The iTunes Library framework provides facilities for retrieving the properties of media items in a user’s iTunes library.
This framework was designed to replace the iTunes XML file that developers query to fetch track and playlist metadata. iTunes library access is read-only.
#import <iTunesLibrary/ITLibrary.h>
NSError *error = nil;
ITLibrary *library = [ITLibrary libraryWithAPIVersion:@"1.0" error:&error];
if (library)
{
NSArray *playlists = library.allPlaylists; // <- NSArray of ITLibPlaylist
NSArray *tracks = library.allMediaItems; // <- NSArray of ITLibMediaItem
}
Important: You must code sign your app in order to get information back from the iTunes Library framework.