Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 2.12 KB

macos-metadata.md

File metadata and controls

36 lines (29 loc) · 2.12 KB

macOS application metadata

Pass a declared property list to electron_app:

macos_extra_plist = "document-types.plist",

Its root must be a dictionary. Fields replace matching main-bundle Info.plist fields before signing; nested dictionaries and arrays replace whole values. Helpers receive no extra fields. Source files remain unchanged. This option requires a macOS target.

App identity, version, package type, app icons, URL handlers and ASAR integrity remain owned by their existing rule attributes. Overriding those fields fails. Entitlements stay in macos_entitlements and macos_entitlements_inherit.

Use CFBundleDocumentTypes for supported documents and UTExportedTypeDeclarations for application-owned types. Document icon names refer to resources staged in Contents/Resources; the example uses its declared app.icns.

The generic example declares an Editor for org.example.sample-desktop.document, the sample-desktop extension, MIME type and document icon. Handle Electron's open-file event before app.whenReady(). Metadata registers capabilities; the application handles the document contents.

BB tests cover metadata, source preservation, archive bytes, helper isolation and rejected identity overrides. The macOS ARM64 smoke registers an isolated bundle, checks the document icon, opens a Unicode filename through LaunchServices and checks delivery and contents. It unregisters and removes the bundle afterward. The 0814e7a BB suite, seven cross-builds and macOS ARM64 job passed, including document icon, document delivery, URL delivery and app launch.