Skip to main content

desktop.json

desktop/desktop.json describes the app: its name, icon, main window, tray and how it is packaged. Every field is optional, so an app without the file runs and packages with the defaults.

desktop/desktop.json
{
"$schema": "../node_modules/@react-native-gpui/cli/desktop.schema.json",
"productName": "My App",
"identifier": "com.example.myapp",
"icon": "assets/icon.png",
"window": { "title": "My App", "width": 1024, "height": 768 },
"bundle": { "targets": "all", "category": "DeveloperTool" }
}

The $schema line gives your editor completion and validation.

Per-OS overrides​

desktop.macos.json, desktop.windows.json and desktop.linux.json are merged over desktop.json on that operating system, following JSON Merge Patch (RFC 7386). Objects merge key by key, other values replace the base value, and null removes a key.

desktop/desktop.windows.json
{
"window": { "titleBar": "hidden" }
}

App​

KeyTypeDescription
productNamestringThe name people see: the title bar, the Dock, the menu bar and installers. Defaults to the app's displayName, then its name.
identifierstringThe reverse-DNS bundle id, such as com.example.myapp. Defaults to an id derived from the app name.
versionstringThe app version. Defaults to the version in package.json.
iconstringOne square PNG, recommended 1024×1024, relative to desktop/. The icon of each operating system is generated from it. Without one, a placeholder icon is used.
urlSchemesstring[]URL schemes that open the app, such as ["myapp"]. Packaging registers them with the operating system, and Linking delivers the URL.
singleInstancebooleanWhether opening the app again hands its URL to the running copy and exits. Defaults to true when urlSchemes is set.
devMenubooleanWhether the development menu is available. Defaults to true in development builds.
accessorybooleanWhether the app runs with no Dock icon (macOS), as a launcher does. Only an accessory app's windows can show over another app's full-screen Space. Defaults to false.

window​

The main window.

KeyTypeDescription
titlestringThe title bar text. Defaults to productName.
width, heightnumberThe size in points. Defaults to 1024 × 768.
position{x, y}Where the window opens. Omit it to let the platform place the window.
resizablebooleanWhether the window can be resized. Defaults to true.
restoreStatebooleanWhether the window remembers its size and position between launches. Defaults to true.
titleBar'default' | 'transparent' | 'hidden'How the title bar is drawn. See Title bar. Defaults to 'default'.
background'opaque' | 'transparent' | 'blurred' | 'mica'What shows through the window. See Transparent windows. Defaults to 'opaque'.
windowButtonsbooleanWhether macOS draws the traffic lights. Defaults to true; other systems ignore it.
shadowbooleanWhether the window has the system shadow. Defaults to true; only macOS draws one yet.
trafficLightPosition{x, y}Where the macOS traffic lights sit in a transparent or hidden title bar. Ignored elsewhere.
menuBarbooleanWhether the main window shows a menu bar. Windows and Linux only; on macOS the bar belongs to the system. Defaults to true.

tray​

A menu-bar or notification-area icon. See Tray.

KeyTypeDescription
componentstringThe React component rendered as the tray popover.
tooltipstringThe tooltip text.
iconstringA PNG or JPEG path relative to desktop/. Without one, a built-in glyph is shown.
iconTemplatebooleanmacOS: draw the icon as a template the menu bar tints. Defaults to false.
accessorybooleanRun the app without a Dock icon. Defaults to true.

bundle​

How the app is packaged by package-desktop.

KeyTypeDescription
targets'all' or string[]The formats to build: app, dmg, nsis, deb, appimage. 'all' means every format the current OS can build.
resourcesstring[]Extra files to ship, relative to desktop/.
copyrightstringThe copyright line shown by installers.
categorystringThe app category, for the Linux desktop entry.

bundle.macos​

KeyDescription
minimumSystemVersionThe oldest macOS the app supports. Defaults to 13.0.
entitlementsA path to an entitlements plist, relative to desktop/.
infoPlistExtra keys merged into the generated Info.plist.

bundle.windows​

KeyDescription
nsis.installModecurrentUser, perMachine or both: who the installer installs the app for.

bundle.linux​

KeyDescription
deb.dependsExtra Debian package dependencies.
appimageAppImage options. None are available yet.