Developers

Swinsian posts notifications about track changes to the NSDistributedNotificationCenter as of version 1.8.8. Other applications can subscribe to these to be notified when new tracks start playing.

Notification Names

The notifications have the following names:

NSString *TrackPlaying = @"com.swinsian.Swinsian-Track-Playing";
NSString *TrackStopped = @"com.swinsian.Swinsian-Track-Stopped";
NSString *TrackPaused = @"com.swinsian.Swinsian-Track-Paused";

Notification User Info

The user info dictionary will contain values for the following keys:

NSString *TrackArtist = @"artist";
NSString *TrackAlbum = @"album";
NSString *TrackTitle = @"title";
NSString *TrackGenre = @"genre";
NSString *TrackComposer = @"composer";
NSString *TrackNumber = @"trackNumber";
NSString *TrackLength = @"length";
NSString *TrackCurrentTime = @"currentTime";
NSString *TrackUUID = @"track_uuid";

The length and current time values will be numbers with units of seconds. All other values are strings, with empty strings for missing tags.