1. Guides
  2. Creating a development or staging app

Guides

Creating a development or staging app

ToDesktop supports the creation of development or staging environments by allowing apps to inherit properties from other apps. This can be done by navigating to your primary app in ToDesktop and clicking the dropdown that is next to the app's name in the header. You can then attach a development/staging app by either connecting an existing an app or creating a new one.

Screenshot of the environments dropdown in the ToDesktop app
INFO

Applications created from the above dropdown will copy over properties from the main app. E.g. if you selected "Add new app to Nimbus" and created a new app, that newly-created app would have the same set of builds artifacts enabled as the original "Nimubs" app (these copied values can still be changed at a later time).

When creating a new app or connecting an existing one, you can specify the relationship that the app should have to the main app. This is where you can tag an app as being Staging, Development, Beta, or any tag you would like to give it.

Screenshot of the relationship dropdown in the ToDesktop app
INFO

The main app in a group is tagged with a “Main” label that cannot be changed. Apps that are in a group with at least one other app cannot be connected to other apps. You will first need to disconnect the app in question before you can add it to another group.

The following data is inherited from the main app in the group:

  • Subscription data - the connected app will inherit the same subscription plan as the main app. This means that any features available to the main app will also be available to all connected apps.
  • Certificate and notarization data - the main app's Mac and Windows certificates will be inherited by the connected app. This means that certificate data doesn't need to be duplicated and managed separately for each app.

To simplify the development process of switching between different app environments, the todesktop.json supports an "extends" key which allows the extension of other todesktop.json configuration. For example, this is how you would create a todesktop.dev.json file that extends a root todesktop.json:

        {
  "extends": "./todesktop.json",
  "id": "app-id",
  "appId": "app.dev.app",
  "icon": "./dev-icon.png",
  "packageJson": {
    "name": "app-dev",
    "productName": "app-name-dev"
  }
}

      

You could then add an additional script in your project's package.json to target the todesktop.dev.json configuration file instead of the default todesktop.json file when building.

        {
  "scripts": {
    "build": "todesktop build",
    "dev-build": "todesktop build --config=./todesktop.dev.json"
  }
}

      

Running npm run dev-build from your terminal would then correctly build the dev app, with subscription and certificate data being inherited as described above.

If you need any more support with managing multiple applications, please send us an email at [email protected].