cocoamacoslaunchdapplication-restart

restart my app after an auto-update?


In OS X how can I automatically re-start my app after pulling down an updated version?

I've looked around some and launchd seems to be the likely way to do this, but I can't seem to get my head around it. I can't seem to find any good resources talking about this specifically either.

I could also create a script or separate process to do this, but that seems clunky at best, I'm expecting there is a better solution out there.


Solution

  • Separate process is good solution, look at Sparkle framework (most of apps use it for autoupdating), they also use for this standalone app - https://github.com/andymatuschak/Sparkle/blob/master/relaunch.m