@electron/osx-sign
    Preparing search index...

    Interface FlatOptions

    Options for creating a flat .pkg installer.

    interface FlatOptions {
        app: string;
        identity?: string;
        identityValidation?: boolean;
        implementation?: "native" | "js";
        install?: string;
        keychain?: string;
        openPermissionsForSquirrelMac?: boolean;
        pkg?: string;
        platform?: ElectronMacPlatform;
        scripts?: string;
    }

    Hierarchy

    • _FlatOptions
      • FlatOptions
    Index

    Properties

    app: string

    Path to the application package. Needs to end with the file extension .app.

    identity?: string

    Name of the certificate to use when signing.

    Selected with respect to provisioningProfile and platform from the selected keychain.

    • mas will look for 3rd Party Mac Developer Application: * (*)
    • darwin will look for Developer ID Application: * (*) by default.
    identityValidation?: boolean

    Flag to enable/disable validation for the signing identity. If enabled, the BaseSignOptions.identity | identity provided will be validated in the BaseSignOptions.keychain | keychain specified.

    true

    implementation?: "native" | "js"

    Which packaging implementation builds the .pkg:

    • 'native' shells out to Apple's pkgbuild/productbuild binaries.
    • 'js' builds the flat package with the bundled pure-JavaScript implementation — substantially faster and usable on any platform. When an BaseSignOptions.identity | identity is provided the built package is signed with productsign (macOS only).

    "native"

    install?: string

    Path to install the bundle.

    "/Applications"

    keychain?: string

    The keychain name.

    login

    openPermissionsForSquirrelMac?: boolean

    Permissions of your "MyApp.app" will be overwritten inside the pkg to be owned by root:admin and 775 instead of 755.

    This is done so that Squirrel Mac updates work better when this PKG is installed on end user machines. Specifically 775 allows any admin to update MyApp.app instead of it being limtied to the user who installed the app in /Applications.

    This is probably what you want to enable if you're shipping a PKG to enterprise companies. It is disabled by default purely for backwards compatibility and will be changed in a future major version.

    false

    pkg?: string

    Output path for the flattened installer package. Needs file extension .pkg.

    Inferred from the app name passed into opts.app.

    Build platform of your Electron app. Allowed values: darwin (Direct Download App), mas (Mac App Store).

    Determined by presence of Squirrel.framework within the application bundle, which is used for non-MAS apps.

    scripts?: string

    Path to a directory containing preinstall.sh or postinstall.sh scripts. These must be executable and will run on pre/postinstall depending on the file name.

    This option is only valid if FlatOptions.platform is set to darwin.