title: Removing a dock icon in OSX Mavericks programmatically
body: <p>Does anybody know any way to remove any application's dock icon on new <code>OSX Mavericks</code> using a script or using Cocoa?
  I have an uninstaller which has to remove dock icon of some applications after uninstalling them. But the existing logic fails in 10.9.
  I have been doing this so far (until 10.8) by removing the icon entry from the <code>com.apple.dock.plist</code> and then killing the dock. However, it doesn't work on Mavericks. 
  I was able to remove the icon using <code>NSUserDefaults</code> however, but it also fails when my app (uninstaller) runs with elevated privileges.
  Any other idea/command/solution would be helpful.</p>