Questions tagged [mpmediaquery]

A media query specifies a set of media items (instances of MPMediaItem) from the iPod library by way of a filter and a grouping type. Filter and grouping type are both optional; an unqualified query matches the entire library.

A media query specifies a set of media items (instances of MPMediaItem) from the iPod library by way of a filter and a grouping type. Filter and grouping type are both optional; an unqualified query matches the entire library.

170 questions
1
vote
1 answer

Retrieve all songs from the iPod library without useing MPMediaPickerController

I'm writing an iPhone app to retrieve all songs from a users iPod library on their iPhone, but I don't want to use the MPMediaPickerController. Meanwhile, I will display the songs in a custom ListView/TableView. I've written a query to select all…
Goober
  • 13,146
  • 50
  • 126
  • 195
1
vote
1 answer

iOS MediaQuery URL crash after opening music player

I have an app that uses MPMediaQuery to create a list of the music the user has on his iPhone. When generating the list, I save the NSURL of each item so I can read the selected song. If, while running the app, I minimize it, open the iOS music…
David Menard
  • 2,261
  • 3
  • 43
  • 67
1
vote
1 answer

Does accessing a user's iTunes library on an iOS device require permission?

If I wanted to get access to the metadata on the music stored in a user's iTunes library via MPMediaQuery, would that require the user to give their permission, in a similar way apps request access to Photos, Contacts, etc.? I've never seen an app…
Luke
  • 9,512
  • 15
  • 82
  • 146
1
vote
0 answers

Querying for ipod library podcasts, and sorting them by author/title

I´v got these two methods that fetches the contents of the iPod library for me. I am still not proficient with the use of these classes. For example now I will get the podcast title of all the podcast in the library, but if I want to set up…
Tom Lilletveit
  • 1,872
  • 3
  • 31
  • 57
1
vote
2 answers

iPhone play a specific playlist/iMix

I want to play a specific playlist (that was constructed as an iMix) from my program, as long as it exists. I am able to use [[MPMediaQuery albumsQuery] addFilterPredicate:[MPMediaPropertyPredicate predicateWithValue:@"MyAlbum"…
Eli
  • 4,874
  • 6
  • 41
  • 50
1
vote
1 answer

Problems populating UITableView with videos in iPod Library using MPMediaQuery

I'm trying to put together a simple app that lists all videos in the iPod library (movies, TV shows, etc) and allows the user to play any video they choose. The app is using a storyboard that has a NavigationController with the UITableView in it. It…
awfulcode
  • 597
  • 5
  • 12
1
vote
0 answers

ALAssetsLibrary: how can I get all the video types from both photo library and video app?

my target is to get url of the videos from not just photo library, but also the videos in the video app (all the types including Movies, TV Shows, Music Videos, etc.). I am using enumerateGroupsWithTypes:usingBlock:failureBlock: and I set…
the_summer_bee
  • 483
  • 4
  • 10
  • 23
1
vote
2 answers

search for iPod artists starting with a letter

Is there a way to use something like a wildcard character to search for all iPod artist names starting with a given letter, something like this: MPMediaPropertyPredicate *artistNamePredicate = [MPMediaPropertyPredicate predicateWithValue:@"A*"…
meggar
  • 1,219
  • 1
  • 10
  • 18
1
vote
1 answer

How to get iTunes Library top 10 song by playcount within recent 5days?

I'm trying to fetch iTunes library in ios. And trying to retrieve top 10 playcount song in 5days. Could you tell me how to do? Here's my code. MPMediaPropertyPredicate is not right answer...I guess. MPMediaQuery *everything = [[MPMediaQuery alloc]…
Noriaki Takamizawa
  • 887
  • 1
  • 10
  • 25
1
vote
1 answer

MPMediaQuery: find Umlauts and special characters when searching

I'm using an MPMediaQuery to search for song titles in the user's library: MPMediaPropertyPredicate *titlePredicate = [MPMediaPropertyPredicate predicateWithValue:titleString …
avf
  • 858
  • 11
  • 24
1
vote
0 answers

MPMediaItem crash on valueForProperty

I have a big problem to get the informations of the songs from the iPod library. Following the official apple reference: MPMediaQuery *query = [MPMediaQuery songsQuery]; // query is an autorelease object NSArray *itemsFromGenericQuery = [everything…
1
vote
0 answers

MPMediaPickerController "Unable to open database file"

One certain occasions, when presenting an MPMediaPickerController on my iOS device, I get no results displayed and logged in the console I find many SQLite errors along with the error "unable to open database file". I've worked in SQLite before and…
btomw
  • 2,512
  • 2
  • 20
  • 25
1
vote
0 answers

How to order alphabetically a MPMusicPlayerController?

i need to order alphabetically a ipod queue. with the following code the songs are not ordered alphabetically MPMediaQuery *everything = [[MPMediaQuery alloc] init]; everything = [MPMediaQuery songsQuery]; [musicPlayer…
1
vote
1 answer

Load playlist with MPMediaQuery

in my app I want to save user playlist in a plist file and load this playlist when app start. this is the code that I use to save: if (self.backgroundMusicItems) { NSMutableArray *songsID = [[NSMutableArray alloc] initWithCapacity:0]; …
Marg
  • 101
  • 1
  • 3
0
votes
1 answer

MPMediaQuery using MPMediaPropertyPredicate without punctuation

MPMediaPropertyPredicate *titlePredicate = [MPMediaPropertyPredicate predicateWithValue:searchText forProperty:MPMediaItemPropertyTitle …
steharro
  • 1,079
  • 8
  • 18