0

I have created an application for Mac OS X, and I have a desktop shortcut for it (created using ln -s). Now I want to add a feature such that whenever this shortcut is double clicked, with the application already running, some action should be performed (like opening a Finder window at a designated path). How can this be implemented?

I tried to create an observer for NSApplication-based notifications inside my application, but nothing constructive came of it.

Can anyone please help?

Rob Keniger
  • 45,830
  • 6
  • 101
  • 134
ping localhost
  • 479
  • 3
  • 22

1 Answers1

2

In your application's delegate, implement -applicationShouldHandleReopen:hasVisibleWindows: and do whatever you like.

Kurt Revis
  • 27,695
  • 5
  • 68
  • 74