Skip to main content
The top-level 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

{
  "mac": {
    "category": "public.app-category.developer-tools",
    "target": ["dmg", "zip"],
    "hardenedRuntime": true,
    "minimumSystemVersion": "10.13.0"
  }
}

Configuration Options

category
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.
target
string | string[] | TargetConfiguration | TargetConfiguration[]
The target package type: list of 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: default (which is dmg and zip for Squirrel.Mac)
identity
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 configuration.
  • Set to - to use an ad-hoc identity for signing
  • Set to null to skip signing entirely
icon
string
default:"build/icon.icns"
The path to application icon.
  • Accepts .icns (legacy) or .icon (Icon Composer asset)
  • If a .icon asset is provided, it will be preferred and compiled to an asset catalog

Entitlements

entitlements
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 configuration.
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 this folder in osx-sign’s repository for examples.See Signing and Notarizing macOS Builds for more information.
entitlementsInherit
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
string
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 entitlements
This option only applies when signing with entitlements provided.
provisioningProfile
string
The path to the provisioning profile to use when signing, absolute or relative to the app root.

Bundle Configuration

bundleVersion
string
The CFBundleVersion. Do not use it unless you need to.
bundleShortVersion
string
The CFBundleShortVersionString. Do not use it unless you need to.
darkModeSupport
boolean
default:"false"
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
string
default:"${appBundleIdentifier}.helper"
The bundle identifier to use in the application helper’s plist.
helperRendererBundleId
string
default:"${appBundleIdentifier}.helper.Renderer"
The bundle identifier to use in the Renderer helper’s plist.
helperPluginBundleId
string
default:"${appBundleIdentifier}.helper.Plugin"
The bundle identifier to use in the Plugin helper’s plist.
helperGPUBundleId
string
default:"${appBundleIdentifier}.helper.GPU"
The bundle identifier to use in the GPU helper’s plist.
helperEHBundleId
string
default:"${appBundleIdentifier}.helper.EH"
The bundle identifier to use in the EH helper’s plist.
helperNPBundleId
string
default:"${appBundleIdentifier}.helper.NP"
The bundle identifier to use in the NP helper’s plist.
extendInfo
any
The extra entries for Info.plist.
minimumSystemVersion
string
The minimum version of macOS required for the app to run. Corresponds to LSMinimumSystemVersion.Example: "10.13.0"

Signing Options

type
'distribution' | 'development'
default:"distribution"
Whether to sign app for development or for distribution.
binaries
string[]
Paths of any extra binaries that need to be signed.
requirements
string
Path of requirements file used in signing.
Not applicable for MAS.
hardenedRuntime
boolean
default:"true"
Whether your app has to be signed with hardened runtime.
gatekeeperAssess
boolean
default:"false"
Whether to let @electron/osx-sign validate the signing or not.
strictVerify
boolean
default:"true"
Whether to let @electron/osx-sign verify the contents or not.
preAutoEntitlements
boolean
default:"true"
Whether to enable entitlements automation from @electron/osx-sign.
signIgnore
string | string[]
Regex or an array of regex’s that signal skipping signing a file.
sign
CustomMacSign | string
The custom function (or path to file or module id) to sign an app bundle.
timestamp
string
Specify the URL of the timestamp authority server.
additionalArguments
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.Example: ["--deep"]

Notarization

notarize
boolean
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:
  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 this issue)

Universal Binary Options

mergeASARs
boolean
default:"true"
Whether to merge ASAR files for different architectures or not.
This option has no effect unless building for “universal” arch.
singleArchFiles
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.
x64ArchFiles
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.

Archive Options

extraDistFiles
string | string[]
Extra files to put in archive.
Not applicable for tar.*.

Inherited Options

macOS configuration inherits all common configuration options.

Build docs developers (and LLMs) love