We have developed our applicaiton using electron,
and sandboxed for the benefit of Mac App Store distribution.
the app file generated by electron is packaged using tool 'productbuild'
So this will convert .app to .pkg and syntac used is
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_HASH" "$RESULT_PATH"
Issue is
Let say if v1.0.0 of app is installed and running,
Then if we update v.1.1 of app -> Old version of app is still running
This causing issue with old app instance.
So how to make mac stop/exit old version of app before installaing new version?
is there way to include additional scripts while creating pkg file?
alteast I want mac to prevent new version of app installation when old version is already runing.