7
votes

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).

1
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
I've added some information, however you understood exactly the point. - Manlio

1 Answers

10
votes

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.