• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: App Listener?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App Listener?


  • Subject: Re: App Listener?
  • From: David LeBer <email@hidden>
  • Date: Thu, 8 Jan 2009 00:58:52 -0500


On 8-Jan-09, at 12:46 AM, Chunk 1978 wrote:

is it possible to set up an NSNotification to listen for launched
apps?  for example, an running app would do something if Safari is
opened, or if Dashboard is activated?

Something like this?
NSNotificationCenter * center = [[NSWorkspace sharedWorkspace] notificationCenter];
[center addObserver:self selector:@selector(appLaunched:) name:NSWorkspaceDidLaunchApplicationNotification object:nil ];
This should give a notification for every app that is launched.
Check the notification's userInfo dictionary get the launched app's identity
;david


--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: 	http://codeferous.com
blog: 	http://davidleber.net
profile:	http://www.linkedin.com/in/davidleber
twitter:	http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________

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


References: 
 >App Listener? (From: "Chunk 1978" <email@hidden>)

  • Prev by Date: Re: App Listener?
  • Next by Date: Fwd: App Listener?
  • Previous by thread: Re: App Listener?
  • Next by thread: Fwd: App Listener?
  • Index(es):
    • Date
    • Thread