Any macOS Target
The top-level mac key contains set of options instructing electron-builder on how it should build macOS targets. These options applicable for any macOS target.
Configuration¶
Electron-Builder / app-builder-lib / MacConfiguration
Extends¶
Extended by¶
Properties¶
additionalArguments?¶
readonly
optional
additionalArguments:null
|string
[]
Array of strings specifying additional arguments to pass to the codesign
command used to sign a specific file.
Some subresources that you may include in your Electron app may need to be signed with –deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.
Usage Example: ['--deep']
binaries?¶
readonly
optional
binaries:null
|string
[]
Paths of any extra binaries that need to be signed.
bundleShortVersion?¶
readonly
optional
bundleShortVersion:null
|string
The CFBundleShortVersionString
. Do not use it unless you need to.
bundleVersion?¶
readonly
optional
bundleVersion:null
|string
The CFBundleVersion
. Do not use it unless you need to.
category?¶
readonly
optional
category:null
|string
The application category type, as shown in the Finder via View -> Arrange by Application Category when viewing the Applications directory.
For example, "category": "public.app-category.developer-tools"
will set the application category to Developer Tools.
Valid values are listed in Apple’s documentation.
darkModeSupport?¶
readonly
optional
darkModeSupport:boolean
Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.
Default¶
false
entitlements?¶
readonly
optional
entitlements:null
|string
The path to entitlements file for signing the app. build/entitlements.mac.plist
will be used if exists (it is a recommended way to set).
MAS entitlements is specified in the mas.
See this folder in osx-sign’s repository for examples.
Be aware that your app may crash if the right entitlements are not set like com.apple.security.cs.allow-jit
for example on arm64 builds with Electron 20+.
See Signing and Notarizing macOS Builds from the Electron documentation for more information.
entitlementsInherit?¶
readonly
optional
entitlementsInherit:null
|string
The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. build/entitlements.mac.inherit.plist
will be used if exists (it is a recommended way to set).
See this folder in osx-sign’s repository for examples.
This option only applies when signing with entitlements
provided.
entitlementsLoginHelper?¶
readonly
optional
entitlementsLoginHelper:null
|string
Path to login helper entitlement file.
When using App Sandbox, the the com.apple.security.inherit
key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.
Defaults to the value provided for entitlements
. This option only applies when signing with entitlements
provided.
extendInfo?¶
readonly
optional
extendInfo:any
The extra entries for Info.plist
.
extraDistFiles?¶
readonly
optional
extraDistFiles:null
|string
|string
[]
Extra files to put in archive. Not applicable for tar.*
.
gatekeeperAssess?¶
readonly
optional
gatekeeperAssess:boolean
Whether to let @electron/osx-sign
validate the signing or not.
Default¶
false
hardenedRuntime?¶
readonly
optional
hardenedRuntime:boolean
Whether your app has to be signed with hardened runtime.
Default¶
true
helperBundleId?¶
readonly
optional
helperBundleId:null
|string
The bundle identifier to use in the application helper’s plist.
Default¶
${appBundleIdentifier}.helper
helperEHBundleId?¶
readonly
optional
helperEHBundleId:null
|string
The bundle identifier to use in the EH helper’s plist.
Default¶
${appBundleIdentifier}.helper.EH
helperGPUBundleId?¶
readonly
optional
helperGPUBundleId:null
|string
The bundle identifier to use in the GPU helper’s plist.
Default¶
${appBundleIdentifier}.helper.GPU
helperNPBundleId?¶
readonly
optional
helperNPBundleId:null
|string
The bundle identifier to use in the NP helper’s plist.
Default¶
${appBundleIdentifier}.helper.NP
helperPluginBundleId?¶
readonly
optional
helperPluginBundleId:null
|string
The bundle identifier to use in the Plugin helper’s plist.
Default¶
${appBundleIdentifier}.helper.Plugin
helperRendererBundleId?¶
readonly
optional
helperRendererBundleId:null
|string
The bundle identifier to use in the Renderer helper’s plist.
Default¶
${appBundleIdentifier}.helper.Renderer
icon?¶
readonly
optional
icon:null
|string
The path to application icon.
Default¶
build/icon.icns
Overrides¶
PlatformSpecificBuildOptions
.icon
identity?¶
readonly
optional
identity:null
|string
The name of certificate to use when signing. Consider using environment variables CSC_LINK or CSC_NAME instead of specifying this option. MAS installer identity is specified in the mas.
mergeASARs?¶
readonly
optional
mergeASARs:boolean
Whether to merge ASAR files for different architectures or not.
This option has no effect unless building for “universal” arch.
Default¶
true
minimumSystemVersion?¶
readonly
optional
minimumSystemVersion:null
|string
The minimum version of macOS required for the app to run. Corresponds to LSMinimumSystemVersion
.
notarize?¶
readonly
optional
notarize:null
|boolean
|NotarizeNotaryOptions
Options to use for @electron/notarize (ref: https://github.com/electron/notarize).
Use false
to explicitly disable
Note: In order to activate the notarization step You MUST specify one of the following via environment variables:
1. APPLE_API_KEY
, APPLE_API_KEY_ID
and APPLE_API_ISSUER
.
2. APPLE_ID
, APPLE_APP_SPECIFIC_PASSWORD
, and APPLE_TEAM_ID
3. APPLE_KEYCHAIN
and APPLE_KEYCHAIN_PROFILE
For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
preAutoEntitlements?¶
readonly
optional
preAutoEntitlements:boolean
Whether to enable entitlements automation from @electron/osx-sign
.
Default¶
true
provisioningProfile?¶
readonly
optional
provisioningProfile:null
|string
The path to the provisioning profile to use when signing, absolute or relative to the app root.
requirements?¶
readonly
optional
requirements:null
|string
Path of requirements file used in signing. Not applicable for MAS.
sign?¶
readonly
optional
sign:null
|string
|CustomMacSign
The custom function (or path to file or module id) to sign an app bundle.
signIgnore?¶
readonly
optional
signIgnore:null
|string
|string
[]
Regex or an array of regex’s that signal skipping signing a file.
singleArchFiles?¶
readonly
optional
singleArchFiles:null
|string
Minimatch pattern of paths that are allowed to be present in one of the ASAR files, but not in the other.
This option has no effect unless building for “universal” arch and applies
only if mergeASARs
is true
.
strictVerify?¶
readonly
optional
strictVerify:boolean
Whether to let @electron/osx-sign
verify the contents or not.
Default¶
true
target?¶
readonly
optional
target:null
|TargetConfiguration
|MacOsTargetName
| TargetConfiguration | MacOsTargetName[]
The target package type: list of default
, dmg
, mas
, mas-dev
, pkg
, 7z
, zip
, tar.xz
, tar.lz
, tar.gz
, tar.bz2
, dir
. Defaults to default
(dmg
and zip
for Squirrel.Mac). Note: Squirrel.Mac auto update mechanism requires both dmg
and zip
to be enabled, even when only dmg
is used. Disabling zip
will break auto update in dmg
packages.
Overrides¶
PlatformSpecificBuildOptions
.target
timestamp?¶
readonly
optional
timestamp:null
|string
Specify the URL of the timestamp authority server
type?¶
readonly
optional
type:null
|"distribution"
|"development"
Whether to sign app for development or for distribution.
Default¶
distribution
x64ArchFiles?¶
readonly
optional
x64ArchFiles:null
|string
Minimatch pattern of paths that are allowed to be x64 binaries in both ASAR files
This option has no effect unless building for “universal” arch and applies
only if mergeASARs
is true
.
Notarize Configuration¶
Electron-Builder / app-builder-lib / NotarizeNotaryOptions
Properties¶
teamId?¶
readonly
optional
teamId:string
The team ID you want to notarize under for when using notarytool
Deprecated¶
Set the APPLE_TEAM_ID
environment variable instead