website/docs/guides/mac-appstore.mdx
This page gives a brief overview of how to submit your Wails App to the Mac App Store.
Certificates, Identifiers & Profiles, click Identifiers and Register a New App ID. Use the format (com.example.app)Certificates and generate new Certificates for Mac App Store Distribution. Download them and import the certificates into Keychain on your local machine.Apps submitted to the Mac App Store must run under Apple's App Sandbox. You must create an entitlements.plist file for this to work. The recommendation is to create this file under this path {PROJECT_DIR}/build/darwin/entitlements.plist.
Example Entitlements File
This is an example entitlements file from the RiftShare app. For reference please put in the entitlements your app requires. Refer to this site for more information. You will need to replace the Team ID and Application Name with the ones you registered above.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.application-identifier</key>
<string>TEAM_ID.APP_NAME</string>
<key>com.apple.developer.team-identifier</key>
<string>TEAM_ID</string>
</dict>
</plist>
Add the Embedded Provisioning Profile The Provisioning Profile created above needs to be added to the root of the application. It needs to be named embedded.provisionprofile.
The following is an example script for building and signing your app for Mac App Store submission. It assumes you are running the script from your root project directory.
Note the certificates for signing the app and signing the installer are different. Please make sure both are imported into Keychain. Find the strings in Keychain and insert them below. Populate your certificate names, and app name below. Running the following script will generate a signed app.pkg file in the root directory of your app.
#!/bin/bash
APP_CERTIFICATE="3rd Party Mac Developer Application: YOUR NAME (CODE)"
PKG_CERTIFICATE="3rd Party Mac Developer Installer: YOUR NAME (CODE)"
APP_NAME="YourApp"
wails build -platform darwin/universal -clean
cp ./embedded.provisionprofile "./build/bin/$APP_NAME.app/Contents"
codesign --timestamp --options=runtime -s "$APP_CERTIFICATE" -v --entitlements ./build/darwin/entitlements.plist "./build/bin/$APP_NAME.app"
productbuild --sign "$PKG_CERTIFICATE" --component "./build/bin/$APP_NAME.app" /Applications "./$APP_NAME.pkg"
You will need to upload the generated package file and associate it to your Application before you will be able to submit it for review.
APP_NAME.pkg file that you generated in the previous step. Upload itBuild select the package that you uploaded via Transporter.That's it! You can now use the site to submit your App for review. After a few business days if all goes well you should see your App live on the Mac App Store.