title: Mac OSX: how to add app icon to dock programmatically?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8317101/add-remove-application-icon-from-dock-at-runtime">Add/remove application icon from dock at runtime?</a><br>
    <a href="https://stackoverflow.com/questions/13451234/programmatically-add-application-icon-to-dock-on-install">Programmatically add application icon to dock on install</a>  </p>
  </blockquote>
  
  
  
  <p>I am wondering how I can add my app icon to the dock programmatically (so that it remains in the dock except if the user removes it). Please don't answer that it is forbidden to do that, I really need to do this for a specific need :)</p>
  
  <p>I have seen these threads:</p>
  
  <p><a href="https://stackoverflow.com/questions/13451234/mac-osx-auto-add-app-in-dock-bar-after-install-app">Programmatically add application icon to dock on install</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8317101/add-remove-application-icon-from-dock-at-runtime">Add/remove application icon from dock at runtime?</a></p>
  
  <p>But they do no answer the question.</p>
  
  <p>Any idea?</p>