Skip to content

use sparkle to quit & relaunch when not updating? #2427

Answered by zorgiepoo
jaredh159 asked this question in Q&A
Discussion options

You must be logged in to vote

The approach I'd use that is similar to Sparkle is including a command line utility in your app which you spawn a task for. It waits until your application(s) with a matching pid or bundle id has terminated. While that happens your app can try to terminate your app ([NSApp terminate:]). When your command line tool sees the app has terminated, it can launch your application (you can use NSWorkspace/NSRunningApplication for this both for observing termination and launching an app). If the user cancels your app quit request (eg. unsaved open document) you can terminate this task, although I am not sure if there is any way to detect that (if you don't want the app termination to be cancellabl…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@zorgiepoo
Comment options

Answer selected by jaredh159
@jaredh159
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants