Write Code that Updates Itself?

Discussion in 'Mac Programming' started by ArtOfWarfare, Jun 2, 2013.

  1. macrumors 604


    Nov 26, 2007
    Specifically, I'm writing a plugin that I want to be capable of updating itself. I figure the steps I should follow are:

    (Assuming a new version is available)
    1 - Download the updated version.
    2 - Move the current version bundle to the trash.
    3 - Move the updated version bundle to where the current version bundle was.
    4 - Launch/load the updated version.
    5 - Terminate/unload the current version.

    What seems like it could be a snag in my plan is here:

    So... is it not possible for me to update the plugin without restarting the entire app? I'd rather not annoy the user with the update process or place a burden on them having to manually do it...

    Does anyone have experience with writing self-updating applications or plug-ins?
  2. macrumors member

    Dec 6, 2010
    Isnt that what the Sparkle.framework does? it auto updates the app, or did you want some thing more?
  3. thread starter macrumors 604


    Nov 26, 2007
    Hmm... It does say that it supports plugins. I guess I can try it out.

Share This Page