Electron persistent

I work with Quasar and use Electron to build it as an executable.

  1. Do I need a Mac/Iphone in order to make my pwa project compiled for Mac/Iphone?
  2. I have a data object. For simplicity, lets say the object is:
user : {
   name: "";
   age: 0;

When the user logs in to the web version, the app loads the data from the server into this object and all is good. When the user logs out, the object is forgotten until the next time he logs in and the app loads the data again.

When working as desktop (Windows for example), I want to store (encrypted) this data locally, so the next time the user logs in, the data will be loaded from that file instead of querying the server for it.

(How) Can I achieve the above?