Expo Desktop

app.json / app.config.js

How to configure the app.json, used for generating the native projects

Expo Desktop extends the app.json / app.config.js to support two new keys: macos and windows.

The app.json file

Here's an example:

app.json
{
  "expo": {
    "name": "MyApp",
    // … other keys…
    "windows": {
      "displayName": "My App",
      "namespace": "com.example.myapp",
      "packageGuid": "c113bfa8-895c-47ec-8f96-8bfee8139db9",
      "projectGuid": "73f72d0a-6563-45ef-a52a-a9cc6359eac8"
    },
    "macos": {
      "bundleIdentifier": "com.example.my-app",
      "infoPlist": {
        "CFBundleName": "My App"
      }
    },
    "experiments": {
      "outOfTreePlatforms": true
    },
    "platforms": ["ios", "android", "macos", "windows"]
  }
}

macos fields

These are exactly the same as the ios keys, so please refer to those docs.

There is one implicit bit of behaviour to be aware of, though. The displayName prop (which determines the window title and the user-facing app name) is calculated from the macos.infoPlist.CFBundleName value.

windows fields

All fields are strings.

FieldBehaviour
namespaceUsed as the namespace for WinRT (i.e. com.example.myapp) and C++ (i.e. com::example::myapp).
projectGuidA GUID identifying the C++ app project. Should be distinct from the packageGuid.
packageGuidA GUID identifying the Windows App Packaging project. Should be distinct from the projectGuid.
displayNameDetermines the window title and the user-facing app name.

The expo-desktop-config-plugins config plugin

There are also various settings that you can configure by explicitly adding the expo-desktop-config-plugins config plugin (it's always implicitly included, but you can customise its props by explicitly adding it). At this time, they're mainly to customise the Package.appxmanifest in the Windows project.

app.json
{
  "expo": {
    // … other keys…
    "plugins": [
      [
        "expo-desktop-config-plugins",
        {
          "description": "The description for the Windows App Store.",
          "executableName": "FunAppName.exe",
          "entrypoint": "Windows.FullTrustApplication",
          "publisherDisplayName": "Anon Mouse",
          "version": "1.0.0.0",
          "minVersionUwp": "10.0.0.0",
          "maxVersionTestedUwp": "10.0.0.0",
          "minVersionWin32": "10.0.17763.0",
          "maxVersionTestedWin32": "10.0.17763.0"
        }
      ]
    ]
  }
}
FieldBehaviour
descriptionSets the Description field on <uap:VisualElements>.
executableNameSets the Executable field on <Application>.
entrypointSets the EntryPoint field on <Application>.
publisherDisplayNameSets the value for CN in the Publisher field on <Identity>, and sets the content of <PublisherDisplayName>.
versionSets the value for Version on <Identity>.
minVersionUwpSets the value for MinVersion on <TargetDeviceFamily Name="Windows.Universal">.
maxVersionTestedUwpSets the value for MaxVersionTested on <TargetDeviceFamily Name="Windows.Universal">.
minVersionWin32Sets the value for MinVersion on <TargetDeviceFamily Name="Windows.Universal">.
maxVersionTestedWin32Sets the value for MaxVersionTested on <TargetDeviceFamily Name="Windows.Desktop">.