Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make downloads dock icon bounce programmatically

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

like image 407
Manlio Avatar asked Dec 01 '11 11:12

Manlio


1 Answers

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.

like image 63
James Williams Avatar answered Sep 28 '22 09:09

James Williams