Search code examples
iphoneobjective-citunesmedia-player

Check if user has a song from iTunes in his library


I am building an iPhone app for music album released on iTunes, client requested that if user purchased the album, the app should allow to play these songs in the app while playing games. I need to find a way how to quicly check if the song is available in the iPod library. I've heard that every song from iTunes has some unique ID but I have no idea how to use it. Searching for the name of the song is not an option in library like mine cause I have over 20 gigs of music ...

Thanks,

Ondrej


Solution

  • You have 20 gigs of music data, not names. Searching for a unique ID involves the same number of searches as for a name, you have the same number of tracks. What happens if the user bought the CD and ripped it into the iPod?