Re: Several Questions
Re: Several Questions
- Subject: Re: Several Questions
- From: Kyle Sluder <email@hidden>
- Date: Sat, 30 May 2009 17:27:26 -0700
On Sat, May 30, 2009 at 5:20 PM, Ammar Ibrahim <email@hidden> wrote:
> 1- How do you ensure only one instance of your app is running? How do you
> detect if it stops responding? Can you restart it using something like a
> watchdog? And how would you go about implementing it?
The system already does this for you. Unless you're not writing a
regular application (say, a daemon or something), or you only want one
instance regardless of how many people are logged in on the machine
(say, using Fast User Switching). If you need to ask this question,
you're probably not in either of these scenarios, so don't worry about
it.
> 2- Is there a way to launch applications like iTunes from cocoa without the
> need to use AppleScript?
Look at the NSWorkspace documentation. iTunes's bundle identifier is
com.apple.iTunes, but in general you can look at any app bundle's
Info.plist file to get its bundle identifier (the CFBundleIdentifier
key).
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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 email@hidden