Last Updated: February 25, 2016
·
631
· macfanatic

NSApplication -addToDock

Older code (Leopard) but will allow you to easily add the currently running application to the user's Dock in Mac OS X via a simple API exposed as a category on NSApplication

[[NSApplication sharedApplication] addApplicationToDock];

Here's the full post with more information and code to download, including a complete Xcode project.