Home/Without a Mac/How do I build a macOS .app and dmg for a Tauri app without a Mac?

How do I build a macOS .app and dmg for a Tauri app without a Mac?

Updated · airankrush

The short answer

Short answer: Tauri's front end and Rust code can be developed on Windows or Linux. Per the official docs, the macOS .app and dmg are produced by running tauri build on a Mac. If you only need periodic builds, CI will do. Rent a Mac when you need to see how the installer looks.

Which steps require macOS

What cannot leave macOS

  • Producing the .app and .dmg. Tauri's macOS application bundle docs and DMG docs both say: run tauri build on a Mac computer. The official GitHub Actions example also assigns macOS runners to the macOS targets.
  • Signing and notarization (see the next page).

What you can finish on Windows or Linux

  • Development and testing of the front end and Rust business logic, and installers for your own platform.
  • Everything in the bundle > macOS section of tauri.conf.json. It is only JSON.

When this step does not necessarily need a rented Mac

If the repository is on GitHub and you only need periodic builds, running the official tauri-apps/tauri-action on macOS runners is enough. Its weakness is having no desktop: the Tauri docs mention a known issue where icon size and position settings do not take effect when a DMG is created on CI/CD platforms. To tune the look of the installer window, or to investigate UI problems that only appear on macOS, you need a Mac whose screen you can see.

How to do it on a remote Mac

  1. Install the minimum environment on the remote Mac

    For desktop apps only, Tauri's prerequisites docs say you do not need the full Xcode. The command line tools are enough: xcode-select --install. Then install Rust with rustup (the install command is in the same document). If the front end uses a JavaScript framework, install Node.js as well. The docs suggest the long-term support version.

  2. Pull the code and build

    Clone the repository, install the front-end dependencies, and run:

    npm run tauri build

    Other package managers or cargo tauri build work too. To get only one kind of output, add a flag: npm run tauri build -- --bundles app or -- --bundles dmg.

  3. Adjust the macOS-specific configuration

    It all lives under tauri.conf.json > bundle > macOS:

    • minimumSystemVersion: the minimum OS version. The docs state the default supports back to macOS 10.13. Raise it if you use newer system APIs.
    • entitlements: points to Entitlements.plist and takes effect at signing time.
    • frameworks: system or bundled frameworks and dylibs to include in the package.
    • files: places extra files at specified locations under .app/Contents.

    When you need to add keys to Info.plist (for example a camera usage description), create src-tauri/Info.plist and Tauri merges it with the generated content. The docs warn against overriding already-generated values such as the version number in it, because that easily causes conflicts.

  4. Set up the dmg installer window

    Under bundle > macOS > dmg you can set background (the background image), windowSize, windowPosition, and the coordinates of the two icons, appPosition and applicationFolderPosition. Rebuild after changing them, then double-click the dmg on the remote desktop to see the real result. This is exactly the part you cannot see on CI.

  5. Build a universal binary when needed

    To have one package support both Apple silicon and Intel Macs:

    npm run tauri build -- --target universal-apple-darwin

    The CLI docs note that compiling a universal app requires both the aarch64-apple-darwin and x86_64-apple-darwin Rust targets to be installed. Add whichever is missing with rustup target add. The output is under target/universal-apple-darwin/release/bundle/. If you are not making a universal package, you can also build one per architecture with --target, as the official CI example does.

  6. Confirm where the version number comes from

    The app version is taken from tauri.conf.json > version. If it is not set, the package version in src-tauri/Cargo.toml is used. Before building, make sure only one of them is in effect so the two do not disagree.

FAQ

The built app runs from Terminal but cannot find a command when launched by double-click

The Tauri docs mention this: GUI apps on macOS do not inherit $PATH from shell profile files. When the app needs to call external commands, they are not found if it is launched from Finder. The docs point to the fix-path-env-rs library as the remedy.

People who download my dmg are told it cannot be opened

An app that is not signed and notarized is blocked by the system. For the fix, see Tauri signing and notarization.

Can I hook the remote Mac up as my own CI runner?

You can install a CI self-hosted runner program on it and have it connect outbound to your code platform to pick up jobs. This does not require changing the machine's network configuration. For suitable scenarios and caveats, see using a rented Mac mini as an always-on build machine.

I only ship a Mac version occasionally. Rent or buy?

It depends on how often you build and whether you need long-term debugging. For the money side alone, see rent vs buy a Mac mini. For pricing and stock, see the plans page.

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All no-Mac guides