Skip to content

Search

Dokumentaatio

Signing for the Mac App Store

Tällä sivulla

The Mac App Store takes a different build from the one people download. It is sandboxed, signed with Apple Distribution rather than Developer ID, checked against a Mac App Store provisioning profile, and handed to App Store Connect as an installer package, a .pkg, signed with a second certificate. It is reviewed rather than notarised.

Some of Apple's services exist only there. By Apple's capability table for macOS, Sign in with Apple, In-App Purchase and Game Center are App Store capabilities: a Developer ID profile does not grant them, so the download leaves them out and the game answers unsupported for each.

How Forge builds it

Once this card is complete, every build exports macos-universal twice: the download, signed by the macOS card, and the store's build, signed by this card alone. The store's build is exported unsigned, then signed in a Linux container, with no Mac anywhere:

  1. The Mac App Store profile goes inside the .app, and the entitlements the export wrote are fitted to it. The bundle's team and bundle id must be the profile's.
  2. rcodesign signs the .app with Apple Distribution, without the hardened runtime, which the store does not want.
  3. The signed .app is packaged as the installer the store takes, a .pkg that installs into /Applications, as Apple's productbuild makes it.
  4. rcodesign signs the .pkg with the Mac Installer Distribution certificate.

The build page shows the .pkg as the store build's artifact.

The engine makes the same build on a Mac of your own, with both identities in the keychain:

balaur export --target macos-universal --app-store \
  --sign "Apple Distribution: Studio (AB12CD34EF)" \
  --provisioning-profile MacAppStore.provisionprofile \
  --installer-identity "3rd Party Mac Developer Installer: Studio (AB12CD34EF)" \
  -o out/Game.app

It writes out/Game.pkg beside the .app. Either way it needs [apple] category and team_id in project.toml.

What you need

An Apple Developer Program membership and:

What Where
An Apple Distribution certificate the one the iOS card holds: Apple has issued one certificate for both platforms since 2019
A Mac App Store provisioning profile Profiles → Mac App Store Connect, for this bundle id, made with that certificate
A Mac Installer Distribution certificate Certificates → Mac Installer Distribution; it shows in Keychain Access as 3rd Party Mac Developer Installer

The installer certificate is exported like any other: find it under My Certificates in Keychain Access, with its private key underneath, and export it as .p12 with a password.

What to put in Forge

Field What
Mac App Store provisioning profile (.provisionprofile) the downloaded profile
Mac Installer Distribution (.p12) the exported installer certificate
Installer certificate password the password you set on export

The Apple Distribution certificate and its password are set once, on the iOS card. The Mac App Store card shows whether they are there and links to that card; it has no second copy to keep up to date.

Then publish

The .pkg goes to App Store Connect with the same API key an iOS build uploads with, and to no other store. The Developer ID build never goes there.

Oletko varma?