Dave
Dave

Reputation: 709

iPhone/iPad itunes library read access?

I looked thru the documentation a bit but didn't see anything of much substance (but I must not be looking in the right place)

What are my options if I want to iterate through a user's itunes library meta data?

Let's say I want to build an Array of all their song titles. Is this possible with current public SDK APIs?

Dave

Upvotes: 5

Views: 2652

Answers (1)

conmulligan
conmulligan

Reputation: 7148

Take a look at the MPMusicPlayerController and MPMediaQuery classes, both are available in 3.0.

If you just want to get an array of all songs in the user's library, try this:

MPMediaQuery *query = [[[MPMediaQuery alloc] init] autorelease];
NSArray *items = [query items];

Upvotes: 5

Related Questions