macOS Packaging
Application Bundle
Section titled “Application Bundle”Package your app as a standard macOS .app bundle:
wails3 package GOOS=darwinThis creates bin/<AppName>.app containing:
- The compiled binary in
Contents/MacOS/ - App icon in
Contents/Resources/(fromicons.icnsor, when present, from an asset catalogAssets.car) Info.plistwith app metadata
Universal Binary
Section titled “Universal Binary”Build for both Apple Silicon and Intel Macs:
wails3 task darwin:package:universalThis creates a single .app that runs natively on both architectures. Universal binaries can be built on any platform — on Linux and Windows, wails3 tool lipo is used automatically.
Customizing the Bundle
Section titled “Customizing the Bundle”Edit build/darwin/Info.plist to customize:
- Bundle identifier (
CFBundleIdentifier) - App name and version
- Minimum macOS version
- File associations
- URL schemes
The app icon is generated from assets in the build/ directory. Use the generate:icons task:
wails3 task common:generate:iconsThis uses build/appicon.png to produce darwin/icons.icns and windows/icon.ico. On macOS you can also provide build/appicon.icon (Icon Composer format): the task passes -iconcomposerinput appicon.icon -macassetdir darwin, which produces Assets.car and darwin/icons.icns from the .icon file (skipped on non-macOS platforms). When Assets.car is present, run the update:build-assets task so that Info.plist and CFBundleIconName are updated accordingly:
wails3 task common:update:build-assetsTo run the icon command manually from the build/ directory:
cd buildwails3 generate icons -input appicon.png -macfilename darwin/icons.icns -windowsfilename windows/icon.ico -iconcomposerinput appicon.icon -macassetdir darwinCode Signing
Section titled “Code Signing”Sign your app for distribution:
# Using the wrapper (auto-detects platform)wails3 sign GOOS=darwin
# Or using the task directlywails3 task darwin:signConfigure signing in build/darwin/Taskfile.yml:
vars: SIGN_IDENTITY: "Developer ID Application: Your Company (TEAMID)" ENTITLEMENTS: "build/darwin/entitlements.plist"Notarization
Section titled “Notarization”For apps distributed outside the Mac App Store, Apple requires notarization:
wails3 task darwin:sign:notarizeFirst, store your credentials. Either run the interactive wizard (wails3 setup signing) or call notarytool directly:
xcrun notarytool store-credentials "my-notarize-profile" \ --team-id "TEAMID" \ --password "app-specific-password"Configure in build/darwin/Taskfile.yml:
vars: SIGN_IDENTITY: "Developer ID Application: Your Company (TEAMID)" KEYCHAIN_PROFILE: "my-notarize-profile"See Signing Applications for details.
DMG Installer
Section titled “DMG Installer”There is no wails3 task darwin:create:dmg task in the shipped Wails 3 templates. To produce a DMG, drive a tool like create-dmg or hdiutil from your own Taskfile after running wails3 task darwin:package (or darwin:package:universal) — the .app bundle ends up under bin/.
# After packaging the .app:hdiutil create -volname "MyApp" -srcfolder bin/MyApp.app -ov -format UDZO MyApp.dmgTroubleshooting
Section titled “Troubleshooting””App is damaged and can’t be opened”
Section titled “”App is damaged and can’t be opened””The app isn’t signed. Either sign it with a Developer ID certificate, or users can bypass Gatekeeper:
xattr -cr /path/to/YourApp.appNotarization fails
Section titled “Notarization fails”Common issues:
- Invalid credentials: Re-run
xcrun notarytool store-credentials(orwails3 setup signing) - Hardened runtime required: Ensure entitlements include
com.apple.security.cs.allow-unsigned-executable-memoryif needed - Missing timestamp: The signing process should include a timestamp automatically
Cross-compiled app won’t run
Section titled “Cross-compiled app won’t run”Cross-compiled macOS binaries aren’t signed. Transfer to a Mac and sign before testing:
codesign --force --deep --sign - YourApp.app