title: Terminate and replace app with earlier version to do upgrade install
body: <p>I'm a newbie in Mac OSx &amp; Objective-C development.</p>
  
  <p>I'd like to ask some help on how to terminate as well as replacing an existing app (with an earlier version) when a later version of the app is being installed or upgraded?</p>
  
  <p>I am aware about updating an app when a new version is available in the App Store or an external server. I've got that covered already. But this one is an implementation for a mac with no internet connection. Upgrading is done manually by installing the app whenever there's a new version available.</p>
  
  <p>Behavior when installing:</p>
  
  <ol>
  <li><p>It should check if there's an existing copy of the app in the system. It should prompt the user to continue and remove the app or cancel the installation.</p></li>
  <li><p>If an existing copy of the app is currently running, it should prompt the user to quit the running copy of the app or cancel the installation. When the user selects to quit the app, it should automatically terminate the app and continue with the installation. The app with the previous version should be replaced by the newly installed copy of the app with the later version.</p></li>
  </ol>
  
  <p>Any help would be much appreciated.</p>