iTunes Music Library.xml Parsing for Mac OS X
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Acorn.xcodeproj
Acorn
AcornTests
.DS_Store
.gitignore
README.md

README.md

AcornOSX

A Cocoa Library for parsing "iTunes Music Library.xml" files - (https://github.com/MattRyder/AcornOSX)

####To Build:

  • Open AcornOSX.xcodeproj into XCode
  • Build the project from the IDE.

####To Use:

  • Add as a Framework reference to your project

####Examples:

//
// Parse and return a list of Song objects from the Library XML
//
- (NSMutableArray *)parseAndReturnSongs
{
   //URL is statically defined here, can be used with NSOpenPanel to get a file location
   NSURL *location = [NSURL fileURLWithPath:@"/Users/USERFOO/Music/iTunes/iTunes Music Library.xml"];
   Library *library = [[Library alloc] initWithLibrary:location];
   
   if([library parseLibrary]) {
      return library.Songs; 
   } else {
      NSLog(@"%@", @"Something went wrong and parseLibrary returned NO");
      return NULL;
   }
}