You need a Media Player environment:
- MPMediaLibrary, MPMediaQuery, etc.
- IPod Library Access Programming Guide
Actual example taken from documents:
MPMediaQuery *everything = [[MPMediaQuery alloc] init]; NSLog(@"Logging items from a generic query..."); NSArray *itemsFromGenericQuery = [everything items]; for (MPMediaItem *song in itemsFromGenericQuery) { NSString *songTitle = [song valueForProperty: MPMediaItemPropertyTitle]; NSLog (@"%@", songTitle); }
source share