If you package a macOS app with Adobe AIR (adt -package -target bundle), sign it and upload it to App Store Connect, sooner or later you hit one of these:
- App Store Connect warns that the build is missing a provisioning profile, and the build never becomes available in TestFlight.
- Capabilities silently fail on the Mac: push notifications, Sign in with Apple, keychain access groups.
- The upload is rejected because the signature or the entitlements don't match what Apple expects.
The reason is simple: ADT never embeds a provisioning profile into a macOS bundle. On iOS, adt -package -target ipa-app-store -provisioning-profile … does it for you. For macOS there is no such option, and neither the AIR documentation nor Apple's documentation covers the AIR case. Xcode does this automatically for native apps, so most guides never mention it.
This article shows the complete, working sequence we use for our own AIR apps in the Mac App Store, including TestFlight, push, Sign in with Apple and in-app purchases.
1. What you need in the Apple Developer portal
- A macOS App ID (explicit, e.g.
com.example.myapp.desktop) with the capabilities you use: Push Notifications, Sign in with Apple, In-App Purchase, … - A "Mac App Store Connect" provisioning profile (Distribution → Mac App Store) for exactly this App ID. Download it. On the Mac it is a
.provisionprofilefile (not.mobileprovision). - Two certificates in your login keychain:
Apple Distribution: <Your Company> (<TEAMID>)(or the older3rd Party Mac Developer Application) – signs the app.3rd Party Mac Developer Installer: <Your Company> (<TEAMID>)– signs the.pkgyou upload.
Every capability you need must be in the profile. If you add Sign in with Apple later, regenerate and re-download the profile. An old profile without the capability is the most common reason for a rejected upload.
You can inspect what a profile contains:
security cms -D -i MyApp_MacAppStore.provisionprofile | plutil -p - | grep -A30 Entitlements
2. Build the bundle with ADT
adt -package -target bundle MyApp.app MyApp-app.xml MyApp.swf -extdir lib ...
AIR copies the Adobe AIR runtime and every macOS ANE framework into MyApp.app/Contents/Frameworks/. That is where you have to look for them when signing, not in META-INF/AIR/extensions.
3. Prepare the bundle before signing
Do all of this before you sign. Any change after signing breaks the signature.
a) Make the bundle writable. AIR produces many read-only files:
chmod -R u+rwX MyApp.app
b) Remove leftover Flash/Adobe files from the AIR framework. They are unsigned or third-party signed and break signing and App Store validation:
R="MyApp.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources"
rm -f "$R/A2712Enabler" "$R/Adobe AIR.vch" "$R/adobecp.vch" \
"$R/Adobe Root Certificate.cer" "$R/Thawte Root Certificate.cer" "$R/WebKit.dylib"
rm -rf "$R/AdobeCP15.plugin" "$R/adobecp.plugin" "$R/Flash Player.plugin"
c) Info.plist. Set CFBundleShortVersionString and CFBundleVersion (every upload needs a higher CFBundleVersion), LSMinimumSystemVersion, the camera and microphone usage descriptions if you need them, and ITSAppUsesNonExemptEncryption = false if you only use standard HTTPS. Then App Store Connect stops asking about encryption on every upload.
d) Raise the deployment target if Apple rejects it. Current Apple tooling rejects Mach-O files with a deployment target below macOS 12. The AIR runtime and many ANEs are built for macOS 11. vtool raises it while keeping the SDK version:
SDK=$(vtool -show-build "$BIN" | awk '/sdk/{print $2; exit}')
vtool -set-build-version macos 12.0 "$SDK" -replace -output "$BIN.tmp" "$BIN" && mv "$BIN.tmp" "$BIN"
Do this for every Mach-O file in Contents/ (the app stub, Adobe AIR.framework, every ANE framework) and set LSMinimumSystemVersion to 12.0.
4. Embed the provisioning profile – the missing step
cp MyApp_MacAppStore.provisionprofile MyApp.app/Contents/embedded.provisionprofile
That's it: one copy. Three things matter:
- The file name and location are fixed:
Contents/embedded.provisionprofile. - Copy it before signing. The signature seals the profile. If you copy it afterwards,
codesign --verifyfails and the upload is rejected. - It must be the Mac App Store profile for exactly this bundle ID, containing every capability your entitlements request.
5. The entitlements file must match the profile
AIR doesn't generate entitlements for you either. Create a plist, e.g. entitlements.plist:
<?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> <!-- identity: must match the profile --> <key>com.apple.application-identifier</key><string>TEAMID.com.example.myapp.desktop</string> <key>com.apple.developer.team-identifier</key><string>TEAMID</string> <!-- Mac App Store apps must be sandboxed --> <key>com.apple.security.app-sandbox</key><true/> <key>com.apple.security.network.client</key><true/> <!-- the AIR runtime needs these --> <key>com.apple.security.cs.allow-jit</key><true/> <key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/> <key>com.apple.security.cs.disable-library-validation</key><true/> <!-- only what you use, and only if it is in the profile --> <key>com.apple.security.device.camera</key><true/> <key>com.apple.security.device.microphone</key><true/> <key>com.apple.developer.aps-environment</key><string>production</string> <key>com.apple.developer.applesignin</key><array><string>Default</string></array> <key>keychain-access-groups</key><array><string>TEAMID.com.example.myapp.desktop</string></array> </dict> </plist>
Note the macOS key names. Push is com.apple.developer.aps-environment (on iOS it is aps-environment), and the identity key is com.apple.application-identifier. If an entitlement isn't covered by the embedded profile, the app is rejected on upload or simply loses that capability.
6. Sign inside-out – twice
Sign the nested code first, then the app. For an AIR app, run the whole sequence twice. After the first pass the outer seal does not settle over the freshly signed frameworks. With a single pass, App Store validation regularly fails.
CERT="Apple Distribution: Your Company (TEAMID)"
AIR="MyApp.app/Contents/Frameworks/Adobe AIR.framework"
for PASS in 1 2; do
codesign -f -s "$CERT" "$AIR/Versions/1.0/Adobe AIR_64"
codesign -f -s "$CERT" "$AIR/Versions/1.0/Adobe AIR"
codesign -f -s "$CERT" "$AIR"
# every ANE framework AIR put into Contents/Frameworks
for FW in MyApp.app/Contents/Frameworks/*.framework; do
[ "$(basename "$FW")" = "Adobe AIR.framework" ] && continue
codesign -f -s "$CERT" "$FW"
done
codesign -f -s "$CERT" --entitlements entitlements.plist \
--strict --timestamp --deep MyApp.app
done
Don't sign Contents/Frameworks/ itself. It is a plain folder, not a bundle.
ANE authors: AIR loads macOS ANEs at runtime with dlopen(). The framework binary must be a dynamic library (clang -dynamiclib … -Wl,-undefined,dynamic_lookup), not a static archive, or it can't be signed and loaded properly.
7. Verify before you upload
codesign --verify --deep --strict --verbose=2 MyApp.app # must say "valid on disk" codesign -d --entitlements :- MyApp.app # the entitlements you expect security cms -D -i MyApp.app/Contents/embedded.provisionprofile | plutil -extract Name raw -
If all three look right, the build is TestFlight-eligible.
8. Package and upload
The Mac App Store takes a signed installer package:
productbuild --component MyApp.app /Applications \
--sign "3rd Party Mac Developer Installer: Your Company (TEAMID)" MyApp.pkg
Upload it with Transporter, or from the command line with an App Store Connect API key:
xcrun altool --upload-app -f MyApp.pkg -t macos --apiKey KEYID --apiIssuer ISSUER-UUID
A few minutes later the build appears in TestFlight.
9. Pitfalls we ran into
- The app no longer opens when you double-click it locally. That is expected: a bundle with an embedded App Store profile only runs when installed through TestFlight or the App Store. For local testing, build a second variant without the profile (and without restricted entitlements such as push, Sign in with Apple and keychain groups), or use a Development profile.
- Xcode's "Distribute App" picks a different profile. If you upload through Xcode's Organizer, it uses the profiles in
~/Library/Developer/Xcode/UserData/Provisioning Profiles, not the one you embedded. An old copy there without a newer capability gets the build refused. Keep that folder in sync or upload withaltool/ Transporter. - "Account Not In This Store" during TestFlight in-app purchase tests on the Mac. TestFlight on macOS may use the US storefront even if your account belongs to another country. Products, prices and introductory offers still load, which proves the StoreKit integration works. App Review uses its own accounts.
- Copying the profile after signing. Always embed it first, then sign.
- A capability missing from the profile. Regenerate the profile after you add a capability to the App ID, then embed the new file.
Checklist
- App ID with all capabilities → Mac App Store profile downloaded
adt -target bundlechmod -R u+rwX, remove the leftover Flash/Adobe files- Info.plist: versions, minimum OS, usage descriptions, encryption flag
- Raise the deployment target to 12.0 if needed (
vtool) cp profile Contents/embedded.provisionprofile- Entitlements file matching the profile
- Sign inside-out, twice
- Verify: signature, entitlements, embedded profile
productbuildwith the installer certificate → upload → TestFlight
Once this sequence is a script, an AIR Mac App Store release is as routine as an iOS one, including TestFlight, push, Sign in with Apple and subscriptions.
Questions about native extensions for Adobe AIR on macOS? klughomesolutions.com
More articles
- Why AIR native extensions don't need a package manager
- One app, many native extensions – and they have to work together
- Two-way voice with echo cancellation in Adobe AIR
- Camera and H.264 live streaming in Adobe AIR, without AIR's camera
- Sign in with Apple and Google in an Adobe AIR app
- Adobe AIR on iOS 27: the launch crash and how to ship anyway
- A distriqt alternative for Adobe AIR native extensions