Do you want to present by yourself the list of available medias in the user iPod Library instead of having the MediaPickerController doing that ?
Here is the good code for you 🙂
1 2 3 4 5 6 7 8 9 |
//::.. We will get the full list of medias ..:: MPMediaQuery *fullList = [fusion_builder_container hundred_percent="yes" overflow="visible"][fusion_builder_row][fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][[MPMediaQuery alloc] init]; //::.. lets go ..:: NSArray *mediaList = [fullList items]; for (MPMediaItem *song in mediaList) { NSString *songTitle = [song valueForProperty: MPMediaItemPropertyTitle]; NSString *songArtist = [song valueForProperty: MPMediaItemPropertyArtist]; NSLog (@"%@ "%@"", songArtist, songTitle); } |
And if you want to get every information of a media into a dictionary (for example to be able to NSLog it), go through this article :
http://www.wptechnology.com/2013/06/16/how-to-nslog-an-mpmediaitem/[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]