XSPFKit is a simple Objective-C framework to add support for XSPF playlist files.
How to use the framework
- Use the shared XSPFManager instance along with a file, URL, an XML string or XML data containing an XSPF playlist document to generate an XSPFPlaylist object.
- For example:
XSPFPlaylist *playlist = [[XSPFManager sharedInstance] playlistFromFile:@"/User/foo.xspf"];
- Or vice versa:
NSString *xml = [[XSPFManager sharedInstance] stringFromPlaylist:playlist];
- The names of the XSPFPlaylist class are self-explanatory; the links property is an NSArray of NSURLs, containing the <link> tags of the playlist. The meta property is an NSArray of NSStrings, each containing one of the playlist's <meta> elements.
- XSPFPlaylist.trackList is an NSArray of XSPFTrack objects (also with obviously named properties). This class' links and meta properties are identical to that of XSPFPlaylist's.