Skip to main content
The macOS app ships through two independent channels from the same Flutter target (apps/mobile/macos, bundle com.tuturuuu.app.mobile): The Mac App Store build shares the iOS App Store Connect record (same bundle identifier, universal purchase), so its builds appear under the macOS platform of that app.

Selecting the store configuration

The Runner target’s Release configurations sign with $(TUTURUUU_RELEASE_ENTITLEMENTS), which Runner/Configs/AppInfo.xcconfig defaults to Runner/Release.entitlements. The store build overrides it only for that invocation:
Flutter passes FLUTTER_XCODE_* variables to xcodebuild as build settings. A custom setting name keeps CocoaPods targets untouched. DESKTOP_STORE_CHANNEL compiles the direct-download updater out even if a release run id were passed; Apple does not allow self-updating Mac App Store apps. Runner/PrivacyInfo.xcprivacy mirrors the iOS manifest and ships in both channels. Info.plist declares ITSAppUsesNonExemptEncryption = false and LSApplicationCategoryType = public.app-category.productivity.

Sandbox decisions

Any new plugin that reads arbitrary paths, spawns processes, opens listening sockets or adds a URL handler must update this table and, if needed, AppStore.entitlements and the profile.

Packaging and upload

scripts/desktop-deployment/package-mac-app-store.mjs takes the built app and:
  1. verifies the provisioning profile is an unexpired macOS distribution profile for the team and bundle, and grants every non-sandbox entitlement requested;
  2. renders AppStore.entitlements with the team prefix and application identifier, embeds the profile, stages local inference dylibs and macOS localizations;
  3. imports the Apple Distribution and Mac Installer Distribution identities into a temporary keychain, signs Mach-O files and nested bundles inside out (helper executables inherit the sandbox), signs the app, verifies the signed entitlements, and builds a signed .pkg with productbuild.
The job then uploads with xcrun altool --upload-app --type macos using the same App Store Connect API key as iOS. Entitlement and profile rules are covered by mac-app-store-entitlements.test.mjs; mobile-build-macos.yaml builds the sandboxed configuration and checks the signed entitlements, privacy manifest and store metadata on every run.

Enabling the channel

The job is skipped unless the repository variable MAC_APP_STORE_ENABLED is true, and its build steps are skipped until the iOS deployment bundle holds all Mac App Store entries (hydrate-bundle.mjs exports MAC_APP_STORE_READY): A partial set fails the job. The existing Apple Distribution certificate, team id and App Store Connect API key are reused. The vault’s file kinds and scalar names are allowlisted, so adding these entries needs a vault schema and validation update before the files can be stored. Apple-side prerequisites: add the macOS platform to the App Store Connect app record, create a Mac Installer Distribution certificate, and create a Mac App Store provisioning profile for com.tuturuuu.app.mobile with the App ID’s Sign in with Apple, Associated Domains and Push Notifications capabilities.