packages
packages copied to clipboard
calling uninstall script from a package when user drag-and-drop the app
I'm working on some app that has LaunchDaemon running on the background, and thus it requires some operations to be removed, prior to deleting the data/exe files.
Is there an option to call an uninstall script upon drag-and-drop my app into the trash bin ?
my app uses pkg file format for deployment, but I couldn't find any uninstall callback within this format. is there a way to do so ?
Thanks
There is no such thing.
Among the usual solutions:
- provide a shell script and instructions to remove the different components.
- write a small app to uninstall the different components (most of the time this is just a wrapper for the shell script in the first solution),
- create an uninstall package with an empty payload and a pre- or post-installations script that will uninstall the components (again this is mostly a wrapper for the shell script in the first solution to avoid dealing with the admin authentication stuff).