May 21, 2024

Molybden 1.4.0: automatic application updates on macOS and universal DMG generation

We are glad to announce the release of Molybden 1.4.0!

In 1.3.0 we introduced automatic application updates on Windows. In this version, we are adding support for macOS. Apart from that, we are extending the Molybden CLI with a new command that allows you to generate a universal DMG for your macOS application.

What’s new

Automatic application updates on macOS

Now you can use the automatic application update functionality on macOS as well.

If you already use this functionality in your Molybden application version for Windows, then you don’t need to do anything special to enable it for macOS. The API is the same for both platforms:

std::string kUpdateServerUrl = "https://storage.googleapis.com/app/updates";

// Check for updates.
app->checkForUpdate(kUpdateServerUrl, [](const CheckForUpdateResult &result) {
  // If an update is available, download and install it.
  auto app_update = result.app_update;
  if (app_update) {
    // Get notifications when the update is installed.
    app_update->onAppUpdateInstalled += [](const AppUpdateInstalled &event) {
      // Ask the user to restart the app to apply the update.
    };
    // Download and install the update.
    app_update->install();
  }
});

We recommend that you read the Updating Application guide to learn more about the automatic update functionality in Molybden.

Universal DMG

By default, your application is built for the current architecture of your Mac. If you want to create a universal DMG that contains both Intel and Apple Silicon binaries, you can use the following command:

npm run molybden build -- --universal

This command will build the application for both Intel and Apple Silicon architectures and create a universal DMG that contains both binaries. The universal DMG will be placed in the ./build-dist/pack directory.

How to upgrade

To install the latest version of Molybden in your project, run the following command:

npm install @molybden-apps/molybden@latest

What’s next

In the next Molybden versions, which will include compatibility with Mac App Store and extend the API with new features. Visit our product roadmap to see what’s coming next.

If you have any questions or feature requests, please feel free to join our Discord or contact us. We will be happy to hear from you!

On this page
Top