Skip to main content

macOS Bundle

Tauri applications for macOS are distributed either with an Application Bundle (.app file) or an Apple Disk Image (.dmg file). The Tauri CLI automatically bundles your application code in these formats, providing options to codesign and notarize your application. Please note that .app and .dmg bundles can only be created on macOS as cross-compilation doesn't work yet.

note

GUI apps on macOS and Linux do not inherit the $PATH from your shell dotfiles (.bashrc, .bash_profile, .zshrc, etc). Check out Tauri's fix-path-env-rs crate to fix this issue.

To build and bundle your Tauri application into a single executable simply run the following command:

yarn tauri build

It will build your frontend (if configured, see beforeBuildCommand), compile the Rust binary, collect all external binaries and resources and finally produce neat platform-specific bundles and installers.

Setting a Minimum System Version

The minimum version of the operating system required for a Tauri app to run in macOS is 10.13. If you need support for newer macOS APIs like window.print that is only supported from macOS version 11.0 onwards, you can change the tauri.bundle.macOS.minimumSystemVersion. This will in turn set the Info.plist LSMinimumSystemVersion property and the MACOSX_DEPLOYMENT_TARGET environment variable.

caution

macOS High Sierra (10.13) no longer receives security updates from Apple. You should target macOS Catalina (10.15) if possible.

Binary Targets

macOS applications can target Apple Silicon, Intel-based Mac computers, or Universal macOS binaries that work on both architectures. By default, the Tauri CLI uses your machine's architecture, but you can configure a different target using the --target flag:

tauri build --target aarch64-apple-darwin

Supported targets are:

  • aarch64-apple-darwin: Apple Silicon (using the M1 processor architecture)
  • x86_64-apple-darwin: Intel-based Macs
  • universal-apple-darwin: produces a Universal macOS Binary that runs on both Apple silicon and Intel-based Macs.

While Apple silicon machines can run applications compiled for Intel-based Macs through a translation layer called Rosetta, this leads to a reduction in performance due to processor instruction translations. It is common practice to let the user choose the correct target when downloading the app, but you can also choose to distribute a Universal Binary. Universal Binaries include both aarch64 and x86_64 executables, giving you the best experience on both architectures. Note, however, that this increases your bundle size significantly.

Application Bundle Customization

The Tauri configuration file provides the following options to customize your application bundle:

info

These options generate the application bundle Info.plist file. You can extend the generated file with your own Info.plist file stored in the Tauri folder (src-tauri by default). The CLI merges both .plist files in production, and the core layer embeds it in the binary during development.