Squirrel / Squirrel.Mac

:shipit: Cocoa framework for updating OS X apps :shipit:
MIT License
1.59k stars 128 forks source link

life cycle event like "--squirrel-install" are not issued #194

Closed wangxiexe closed 7 years ago

wangxiexe commented 7 years ago

I am using electron-builder to create app which has Squirrel.Mac support

the build output is dmg and I can install the app by drag it into application folder

but I noticed the life cycle events (which works fine on windows) like "--squirrel-install" "--squirrel-updated" are not issued, and I can not add handler

is it by design or if there is some other way on mac I can do to listen for life cycle events ?

thanks.

joshaber commented 7 years ago

Those lifecycle events are Squirrel.Windows-specific. You can recreate them by storing some state and noting it (or in the case of install, the lack thereof).

wangxiexe commented 7 years ago

thanks @joshaber , what I want to do is clear the data when the app is moved into trash. do you have any best practice for such case with Squirrel.Mac ? thanks.

joshaber commented 7 years ago

Unfortunately macOS doesn't provide any hooks for application deletion.