i'm currently writing an application in Objective-C which displays the artist name of the song currently being played in iTunes, however i want the artist name to update when the song changes.
This is the method i have so far which gets the artist name and sets a NSTextField to display the artist name.
- (void)updateArtistName {
iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
NSString *artistNameString = [NSString stringWithFormat:@"%@", [[iTunes currentTrack] artist]];
[artistName setStringValue:artistNameString];}
Any help would be much appreciated, thanks, Sami.