Reputation: 18865
Does anyone know if it's possible to create an MPMediaItemCollection object containing every song in a users iPod library without the user having to select it using the MPMediaPicker stuff? Like, on application launch perhaps.
Thanks...
Upvotes: 1
Views: 600
Reputation: 21
// _musicPlayer = [MPMusicPlayerController iPodMusicPlayer];
MPMediaQuery *allLibrary = [[MPMediaQuery alloc]init];
[allLibrary setGroupingType:MPMediaGroupingTitle];
[_musicPlayer setQueueWithQuery:allLibrary];
Upvotes: 2
Reputation: 768
Try this one
MPMediaQuery *everything = [[MPMediaQuery alloc] init];
NSArray *songs = [everything items];
MPMediaItemCollection *mediaCollection = [MPMediaItemCollection collectionWithItems:songs];
[everything release];
Upvotes: 1