Subject: Re: Best Strategy to Control iTunes
For issue 1: I use NSWorkspace to handle this. Someone more knowledgeable
than me might be able to answer your more detailed questions. When I launch
my app, I check the sharedWorkspace to see if "com.apple.iTunes" is already
running. If not, I launch it.
For issue 2: There is a nifty framework for communicating with iTunes. It's
called EyeTunes and has made my life much easier when working with iTunes.
Just search for EyeTunes in Google and it should be the first hit.
On Mon, Mar 30, 2009 at 10:03 AM, Ammar Ibrahim <ammar.ibrahim@xxxxxxxxx>wrote:
> I'm currently developing an App in iTunes, and I'm new to Cocoa and the
> entire Mac development world. So far, things are looking great. I have few
> questions, about which is the best strategy to follow in order to
> some tasks. This is a special purpose app, in a controlled environment.
> * Open iTunes if it's not already open.
> - Is using NSWorkSpace the best way to launch iTunes? Or should I use
> a different method? What ar the side effects if the application was already
> - How can I detect if iTunes is not responding? I'd like to force quit
> it, and open it again
> - In a nutshell, I'd like iTunes to be open all times, and responsive,
> how can I guarentee this?
> * Communcation with iTunes
> - What's the best interface to use? Running Apple Script through osa
> (by shell invocation) inside my app? AppleScript-Cocoa bridge? Any other
> - It's known that if any dialog is open in iTunes it freezes any
> communication through the scriptable interface, how can I detect that and
> put all my "messages" in a queue, so that ...
when iTunes is responsive, I can
> send my messages?
> Thanks in advance,
> Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> Help/Unsubscribe/Update your Subscription:
> This email sent to mwsuman@xxxxxxxxx
Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to maillists@xxxxxxxxx