TAGS :Viewed: 1 - Published at: a few seconds ago

[ Electron for MAS (Mac app store) ]

After doing a lot of research I've found that in order to build an electron app for the Mac App Store, it requires a special build of Electron. Previously though I've only used electron-prebuilt installed via npm.

Is there a way to install the mac app store version via npm or is there a pre-built version? I can't seem to find any such packages. I do notice the full code is here https://github.com/atom/electron/releases but, it would be nicer to have the dependencies remain in my package.json if possible. Is there a recommended way to set this up?

Answer 1


First, you need to install electron-packager to package the app:

npm install -g electron-packager

Then, use:

electron-packager <sourcedir> <appname> --platform=darwin --arch=x64 --version=<Electron version> [optional flags...]

to package the app.

Note: replace arch with ia32 if you're packaging for 32-bit, or all to package for both.

Finally, you need to follow the guide for submission (and the Apple one).