I have an electron.js application where I am trying to clear the local storage of the application on uninstalling the application. The application's installer/uninstaller depends Squirrel.Windows. I have tried the following code using electron.session on --squirrel-uninstall
event, but that does not work
try {
// clear storage data on uninstall
const defaultSession = session.defaultSession;
defaultSession.clearStorageData();
defaultSession.clearCache()
} catch (e) {
console.log(e);
}
Any help will be highly appreciated.