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:
{
"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.
| Field | Behaviour |
|---|---|
namespace | Used as the namespace for WinRT (i.e. com.example.myapp) and C++ (i.e. com::example::myapp). |
projectGuid | A GUID identifying the C++ app project. Should be distinct from the packageGuid. |
packageGuid | A GUID identifying the Windows App Packaging project. Should be distinct from the projectGuid. |
displayName | Determines 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.
{
"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"
}
]
]
}
}| Field | Behaviour |
|---|---|
description | Sets the Description field on <uap:VisualElements>. |
executableName | Sets the Executable field on <Application>. |
entrypoint | Sets the EntryPoint field on <Application>. |
publisherDisplayName | Sets the value for CN in the Publisher field on <Identity>, and sets the content of <PublisherDisplayName>. |
version | Sets the value for Version on <Identity>. |
minVersionUwp | Sets the value for MinVersion on <TargetDeviceFamily Name="Windows.Universal">. |
maxVersionTestedUwp | Sets the value for MaxVersionTested on <TargetDeviceFamily Name="Windows.Universal">. |
minVersionWin32 | Sets the value for MinVersion on <TargetDeviceFamily Name="Windows.Universal">. |
maxVersionTestedWin32 | Sets the value for MaxVersionTested on <TargetDeviceFamily Name="Windows.Desktop">. |