[Mono-osx] Access iTunes using C#

Geoff Norton gnorton at novell.com
Thu Jan 17 14:09:15 EST 2008

Right now there isn't much there.  However the new ScriptBridge stuff  
combined with objc2 bindings I'm currently working on could do this  
(assuming you actually can do the manipulation you want thru  

Take a look at:


We could likely write a similar tool to sdp (or a post-processor; or  
simbl; or something) to do the conversion to a C# class then you could  
do things like

iTunesApplication itunes =  
SBApplication.ApplicationWithBundleIdentifier ("com.apple.iTunes");

Console.WriteLine (itunes.CurrentTrack.Name);

This is all off the top of my head tho (I havn't looked into how  
feasible hacking sdp to that would be; you might need to manually bind  
all that).

Also my objc2 bindings are far from complete at this stage, no ETA on  
when they'll ship yet.

Today you could bind NSAppleScript as mentioned in the other e-mail


On 17-Jan-08, at 1:56 PM, Bart Masschelein wrote:

> Hi all,
> I was wondering if there is a way to access iTunes using Mono/C#. I
> know there is an SDK for Windows available, but is there as well an
> SDK for OSX? It would be rather strange if not, no? I'm not
> particularly interested in controlling iTunes (play/stop/pause/next
> song/etc) but rather in importing songs, changing the tags etc. The
> ultimate idea is to synchronize between a local iTunes library and a
> remote iTunes on another Mac. Reading the xml library file alone will
> not do, since I would also like to actually change the library, and
> add/remove songs. I know I could do those things using AppleScript,
> but I am more the platform independent kind of guy, in love
> with .NET ;-).
> cheers,
> Bart
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx

More information about the Mono-osx mailing list