Interface: ElectronSignOptions
Signing options passed to @electron/osx-sign. Electron-builder owns the fields it must control
itself — app, keychain, platform, version, optionsForFile, and type (derived from the
build flavor: mas-dev → development, otherwise distribution) — and forwards everything else.
Additionally exposes a small set of per-file convenience fields that electron-builder maps
internally through optionsForFile.
See
https://packages.electronjs.org/osx-sign
Extends
Omit<OnlySignOptions,"optionsForFile"|"version"|"type">
Properties
additionalArguments?
readonlyoptionaladditionalArguments?:string[] |null
Extra arguments passed to each codesign invocation.
Example
["--deep"]
batchCodesignCalls?
optionalbatchCodesignCalls?:boolean
Experimental
Combine all files with identical CLI arguments in a single codesign call instead of running
codesign once for each of those files. This minimizes the number of child processes that need
to be spawned and reduces the time it takes to sign all files.
Default Value
false
Inherited from
Omit.batchCodesignCalls
binaries?
optionalbinaries?:string[]
Array of paths to additional binaries that will be signed along with built-ins of Electron.
Default Value
undefined
Inherited from
Omit.binaries
entitlements?
readonlyoptionalentitlements?:string|null
Path to the main app entitlements file.
Falls back to build/entitlements.mac.plist if it exists, then to @electron/osx-sign's
built-in defaults.
entitlementsInherit?
readonlyoptionalentitlementsInherit?:string|null
Path to child entitlements inherited by embedded frameworks and bundles.
Falls back to build/entitlements.mac.inherit.plist if it exists.
entitlementsLoginHelper?
readonlyoptionalentitlementsLoginHelper?:string|null
Path to entitlements for the Login Helper.
Required when using App Sandbox, because the Login Helper cannot inherit entitlements.
Defaults to the value of entitlements.
hardenedRuntime?
readonlyoptionalhardenedRuntime?:boolean
Whether to enable Hardened Runtime.
Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).
Defaults to true for darwin builds and false for mas-dev.
See
https://github.com/electron/fuses
identity?
readonlyoptionalidentity?:string|null
The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.
Prefer the environment variables CSC_LINK / CSC_NAME over hardcoding this value.
- Not set (default): electron-builder searches the keychain for a valid certificate.
null: skip signing entirely."-": ad-hoc signing (requires disabling library validation — seehardenedRuntime).
identityValidation?
optionalidentityValidation?:boolean
Flag to enable/disable validation for the signing identity. If enabled, the SignOptions.identity | identity provided will be validated in the BaseSignOptions.keychain | keychain specified.
Default Value
true
Inherited from
Omit.identityValidation
ignore?
optionalignore?:string|string[] | ((file) =>boolean)
Defines files that will be skipped during the code signing process.
This property accepts a regex, function or an array of regexes and functions.
Elements of other types are treated as RegExp.
File paths matching a regex or returning a true value from a function will be ignored.
Default Value
undefined
Inherited from
Omit.ignore
preAutoEntitlements?
optionalpreAutoEntitlements?:boolean
Flag to enable/disable entitlements automation tasks necessary for code signing most Electron apps.
- Adds
com.apple.security.application-groupsto the entitlements file - Fills in the
ElectronTeamIDproperty inInfo.plistwith the provisioning profile's Team Identifier or by parsing the identity name.
Default Value
true
Inherited from
Omit.preAutoEntitlements
preEmbedProvisioningProfile?
optionalpreEmbedProvisioningProfile?:boolean
Flag to enable/disable the embedding of a provisioning profile into the app's Contents folder.
Will use the profile from OnlySignOptions.provisioningProfile if provided. Otherwise, it
searches for a .provisionprofile file in the current working directory.
Default Value
true
Inherited from
Omit.preEmbedProvisioningProfile
provisioningProfile?
optionalprovisioningProfile?:string
Path to a provisioning profile, which can be used to grant restricted entitlements to your app.
See Apple Documentation for more details.
Inherited from
Omit.provisioningProfile
requirements?
readonlyoptionalrequirements?:string|null
Path to a requirements file. Not applicable for MAS.
strictVerify?
optionalstrictVerify?:string|boolean
Flag to enable/disable the --strict flag when verifying the signed application bundle.
Also supports string values to specify which strict restrictions to use, see codesign man page for supported values.
Default Value
true
Inherited from
Omit.strictVerify
timestamp?
readonlyoptionaltimestamp?:string|null
URL of the timestamp authority server. Passed per-file to codesign --timestamp=<url>.