mac key contains options for building macOS targets. These options are applicable for any macOS target including DMG, PKG, and Mac App Store builds.
Basic Example
Configuration Options
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.The target package type: list of Default:
default, dmg, mas, mas-dev, pkg, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir.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.default (which is dmg and zip for Squirrel.Mac)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 configuration.
- Set to
-to use an ad-hoc identity for signing - Set to
nullto skip signing entirely
The path to application icon.
- Accepts
.icns(legacy) or.icon(Icon Composer asset) - If a
.iconasset is provided, it will be preferred and compiled to an asset catalog
Entitlements
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 configuration.See this folder in osx-sign’s repository for examples.See Signing and Notarizing macOS Builds for more information.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.Path to login helper entitlement file.When using App Sandbox, the
com.apple.security.inherit key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.Default: Value provided for entitlementsThis option only applies when signing with
entitlements provided.The path to the provisioning profile to use when signing, absolute or relative to the app root.
Bundle Configuration
The
CFBundleVersion. Do not use it unless you need to.The
CFBundleShortVersionString. Do not use it unless you need to.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.
The bundle identifier to use in the application helper’s plist.
The bundle identifier to use in the Renderer helper’s plist.
The bundle identifier to use in the Plugin helper’s plist.
The bundle identifier to use in the GPU helper’s plist.
The bundle identifier to use in the EH helper’s plist.
The bundle identifier to use in the NP helper’s plist.
The extra entries for
Info.plist.The minimum version of macOS required for the app to run. Corresponds to
LSMinimumSystemVersion.Example: "10.13.0"Signing Options
Whether to sign app for development or for distribution.
Paths of any extra binaries that need to be signed.
Path of requirements file used in signing.
Not applicable for MAS.
Whether your app has to be signed with hardened runtime.
Whether to let
@electron/osx-sign validate the signing or not.Whether to let
@electron/osx-sign verify the contents or not.Whether to enable entitlements automation from
@electron/osx-sign.Regex or an array of regex’s that signal skipping signing a file.
The custom function (or path to file or module id) to sign an app bundle.
Specify the URL of the timestamp authority server.
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.Example: ["--deep"]Notarization
Whether to disable electron-builder’s @electron/notarize integration.
In order to activate the notarization step You MUST specify one of the following via environment variables:
APPLE_API_KEY,APPLE_API_KEY_IDandAPPLE_API_ISSUERAPPLE_ID,APPLE_APP_SPECIFIC_PASSWORD, andAPPLE_TEAM_IDAPPLE_KEYCHAINandAPPLE_KEYCHAIN_PROFILE
Universal Binary Options
Whether to merge ASAR files for different architectures or not.
This option has no effect unless building for “universal” arch.
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.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.Archive Options
Extra files to put in archive.
Not applicable for
tar.*.