I am using electron forge for building and packaging my electron app.
How can I code sign my app (using electron forge) for windows and mac?
Electrong-forge: https://github.com/electron-userland/electron-forge
To install electron-forge, run npm i -g electron-forge . Once installed, it can either scaffold a new project with the electron-forge init command or import an exiting project with the electron-forge import command.
packagerConfig
key in your package.json
.Electron Forge uses Electron Packager under the hood and allows you to set the Electron Packager configuration in your package.json
.
Here's an extract of what mine looks like in order to sign our packaged application file:
package.json
{
"config": {
"forge": {
"packagerConfig": {
"osxSign": {
"identity": "Developer ID Application: Joshua Pinter (<your_key_code>)"
}
}
}
}
}
You can see that all the Electron Packager configurations can be put under the packagerConfig
key.
NOTE: In older versions of Electron Forge, this was called electronPackagerConfig
instead of packagerConfig
.
electronPackagerConfig
is now packagerConfig
, e.g.:
{
"config": {
"forge": {
"packagerConfig": {
"osxSign": {
"identity": "Developer ID Application: Company (id)"
}
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With