9

How can I make the dock Downloads icon bounce programmatically?
Notice that I don't want my app icon to bounce, but only Downloads' icon.

In particular, I'm downloading a file from my app to Downloads folder. No problem with this, but I want the Downloads icon to bounce when the download is finished (as happen when Safari completes a download).

Manlio
  • 10,768
  • 9
  • 50
  • 79
  • Your question isn't very clear. Be more specific about what you are trying to do. I think you mean you want to force the Mac OS X Download Folder on the dock to bounce? I very much doubt that is possible. – Chris Grant Dec 01 '11 at 11:20
  • I've added some information, however you understood exactly the point. – Manlio Dec 01 '11 at 11:26

1 Answers1

10

A quick Google search turns up

[[NSDistributedNotificationCenter defaultCenter]
        postNotificationName:@"com.apple.DownloadFileFinished"
        object:pathToFile];

from http://iloveco.de/quick-trick-bouncing-the-downloads-stack/

I think the trick for knowing what to search for was knowing that the folders in the Dock have been called "Stacks" since 10.5.

James Williams
  • 1,861
  • 1
  • 15
  • 21