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.
MacConfiguration
undefined
-
categoryString | “undefined” - 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.
-
targetString | TargetConfiguration - The target package type: list ofdefault,dmg,mas,mas-dev,pkg,7z,zip,tar.xz,tar.lz,tar.gz,tar.bz2,dir. Defaults todefault(dmgandzipfor Squirrel.Mac). Note: Squirrel.Mac auto update mechanism requires bothdmgandzipto be enabled, even when onlydmgis used. Disablingzipwill break auto update indmgpackages. -
identityString | “undefined” - 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. -
icon=build/icon.icnsString | “undefined” - The path to application icon. -
entitlementsString | “undefined” - The path to entitlements file for signing the app.build/entitlements.mac.plistwill 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 likecom.apple.security.cs.allow-jitfor example on arm64 builds with Electron 20+. See Signing and Notarizing macOS Builds from the Electron documentation for more information. -
entitlementsInheritString | “undefined” - The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution.build/entitlements.mac.inherit.plistwill 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
entitlementsprovided. -
entitlementsLoginHelperString | “undefined” - Path to login helper entitlement file. When using App Sandbox, the thecom.apple.security.inheritkey that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable. Defaults to the value provided forentitlements. This option only applies when signing withentitlementsprovided. -
provisioningProfileString | “undefined” - The path to the provisioning profile to use when signing, absolute or relative to the app root. -
bundleVersionString | “undefined” - TheCFBundleVersion. Do not use it unless you need to. -
bundleShortVersionString | “undefined” - TheCFBundleShortVersionString. Do not use it unless you need to. -
darkModeSupport=falseBoolean - 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. -
helperBundleId=${appBundleIdentifier}.helperString | “undefined” - The bundle identifier to use in the application helper’s plist. -
helperRendererBundleId=${appBundleIdentifier}.helper.RendererString | “undefined” - The bundle identifier to use in the Renderer helper’s plist. -
helperPluginBundleId=${appBundleIdentifier}.helper.PluginString | “undefined” - The bundle identifier to use in the Plugin helper’s plist. -
helperGPUBundleId=${appBundleIdentifier}.helper.GPUString | “undefined” - The bundle identifier to use in the GPU helper’s plist. -
helperEHBundleId=${appBundleIdentifier}.helper.EHString | “undefined” - The bundle identifier to use in the EH helper’s plist. -
helperNPBundleId=${appBundleIdentifier}.helper.NPString | “undefined” - The bundle identifier to use in the NP helper’s plist. -
type=distribution“distribution” | “development” | “undefined” - Whether to sign app for development or for distribution. -
extendInfoany - The extra entries forInfo.plist. -
binariesArray<String> | “undefined” - Paths of any extra binaries that need to be signed. -
minimumSystemVersionString | “undefined” - The minimum version of macOS required for the app to run. Corresponds toLSMinimumSystemVersion. -
requirementsString | “undefined” - Path of requirements file used in signing. Not applicable for MAS. -
extraDistFilesArray<String> | String | “undefined” - Extra files to put in archive. Not applicable fortar.*. -
hardenedRuntime=trueBoolean - Whether your app has to be signed with hardened runtime. -
gatekeeperAssess=falseBoolean - Whether to let @electron/osx-sign validate the signing or not. -
strictVerify=trueBoolean - Whether to let @electron/osx-sign verify the contents or not. -
preAutoEntitlements=trueBoolean - Whether to enable entitlements automation from @electron/osx-sign. -
signIgnoreArray<String> | String | “undefined” - Regex or an array of regex’s that signal skipping signing a file. -
signmodule:app-builder-lib/out/macPackager.__type | String | “undefined” - The custom function (or path to file or module id) to sign an app bundle. -
timestampString | “undefined” - Specify the URL of the timestamp authority server -
mergeASARs=trueBoolean - Whether to merge ASAR files for different architectures or not.This option has no effect unless building for “universal” arch.
-
singleArchFilesString | “undefined” - 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
mergeASARsistrue. -
x64ArchFilesString | “undefined” - Minimatch pattern of paths that are allowed to be x64 binaries in both ASAR filesThis option has no effect unless building for “universal” arch and applies only if
mergeASARsistrue. -
notarizeNotarizeLegacyOptions | NotarizeNotaryOptions | Boolean | “undefined” - Options to use for @electron/notarize (ref: https://github.com/electron/notarize). Supports bothlegacyandnotarytoolnotarization tools. Usefalseto explicitly disableNote: In order to activate the notarization step You MUST specify one of the following via environment variables: 1.
APPLE_API_KEY,APPLE_API_KEY_IDandAPPLE_API_ISSUER. 2.APPLE_IDandAPPLE_APP_SPECIFIC_PASSWORD3.APPLE_KEYCHAINandAPPLE_KEYCHAIN_PROFILEFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
NotarizeLegacyOptions
undefined
appBundleIdString | “undefined” - The app bundle identifier your Electron app is using. E.g. com.github.electron. Useful if notarization ID differs from app ID (unlikely). Only used bylegacynotarization toolascProviderString | “undefined” - Your Team Short Name. Only used bylegacynotarization tool
NotarizeNotaryOptions
undefined
teamIdString - The team ID you want to notarize under for when usingnotarytool
And all common platform-specific options.