diff --git a/packages/app-builder-lib/scheme.json b/packages/app-builder-lib/scheme.json index a42f051a857..e7ec6b65f7a 100644 --- a/packages/app-builder-lib/scheme.json +++ b/packages/app-builder-lib/scheme.json @@ -1847,6 +1847,11 @@ "description": "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.", "type": "boolean" }, + "hardenedRuntime": { + "default": false, + "description": "Whether your app has to be signed with hardened runtime.", + "type": "boolean" + }, "detectUpdateChannel": { "default": true, "description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.", @@ -2332,6 +2337,11 @@ "description": "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.", "type": "boolean" }, + "hardenedRuntime": { + "default": false, + "description": "Whether your app has to be signed with hardened runtime.", + "type": "boolean" + }, "detectUpdateChannel": { "default": true, "description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.", diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index c6c62e9de6d..f96f711dc05 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -172,7 +172,8 @@ export default class MacPackager extends PlatformPackager { keychain: keychainName || undefined, binaries: (isMas && masOptions != null ? masOptions.binaries : macOptions.binaries) || undefined, requirements: isMas || macOptions.requirements == null ? undefined : await this.getResource(macOptions.requirements), - "gatekeeper-assess": appleCertificatePrefixes.find(it => identity!.name.startsWith(it)) != null + "gatekeeper-assess": appleCertificatePrefixes.find(it => identity!.name.startsWith(it)) != null, + "hardened-runtime": macOptions.hardenedRuntime } await this.adjustSignOptions(signOptions, masOptions) diff --git a/packages/app-builder-lib/src/options/macOptions.ts b/packages/app-builder-lib/src/options/macOptions.ts index 10add0bcbb9..d10cb40bd05 100644 --- a/packages/app-builder-lib/src/options/macOptions.ts +++ b/packages/app-builder-lib/src/options/macOptions.ts @@ -110,6 +110,12 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions { * Extra files to put in archive. Not applicable for `tar.*`. */ readonly extraDistFiles?: Array | string | null + + /** + * Whether your app has to be signed with hardened runtime. + * @default: false + */ + readonly hardenedRuntime?: boolean } export interface DmgOptions extends TargetSpecificOptions {