Issue after creating build in Mac 10.12 version


We are using electron to create our application. We have successfully created the application using nodejs, electron and sqlite3. Now we are facing 1 blocker issue. When we create our build in Mac 10.12, we are uploading the build and after downloading the build the database become readonly. We can not perform insert/update/delete operation with it. It is working with older version of Mac. Please sugge


You need to store the database file in a location that your app has permission to write to, I would suggest storing it in the location returned by app.getPath('userData'). If you’re shipping a database file with your app then you’ll need to copy it to the aforementioned location on first run.


It is giving app.getPath is not a function. If I console.log(app.getPath(‘userData’)) it is showing nothing.


I tested this in mac console.log(app.getPath(‘userData’)) , it is giving me location.
I tested this command in main.js