These are the steps to package a macOS application. It took me a while to figure out the whole process, I hope it can help someone. 🤘
Remember to build the React App before to follow these steps (otherwise you will see a blank screen after packaging the application).
shellnpm run build
Go to the project folder and download electron-packager
from npm:
shellnpm i -g electron-packager
It's recommended to perform a global installation because electron-packager bash command could be not recognized if not doing so.
You can create a simple .png of a minimum resolution of 512 x 512 px and convert it to .icns using CloudConvert.
Place the Logo.icns
into the project folder.
Run this command from the project folder:
shellelectron-packager . --overwrite --platform=darwin --arch=x64 --icon=Logo.icns --prune=true --out=release-builds
You will have a new folder release-builds
with your packaged application.
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.