ios: release-mac.sh — manual Developer ID profile override (LCHAT_MAC_SIGNING_PROFILE) (#1311)
Automatic -exportArchive needs an Xcode-managed 'Mac Team Direct' profile in the local cache; with none present it tries to cloud-mint one, which an ASC API key cannot do (Developer ID profiles are Account-Holder-only) and the export dies with 'Cloud signing permission error' + 'No profiles … were found'. Hit on the 0.8.1 mint after the stale cached profile (pre-App-Groups) was deleted so the App ID's new capability could take effect. LCHAT_MAC_SIGNING_PROFILE names an installed profile (e.g. one minted via the ASC API, profileType MAC_APP_DIRECT) and flips the export options to manual signing with the local Developer ID Application cert. Unset = automatic, as before.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+23
−0
ios/release-mac.sh+23 −0
diff --git a/ios/release-mac.sh b/ios/release-mac.sh| index a383fa6..5650de9 100755 |
| --- a/ios/release-mac.sh |
| +++ b/ios/release-mac.sh |
| @@ -21,6 +21,15 @@ |
| # before running this script (never committed, never passed on argv). |
| # Optional env: |
| # LCHAT_RELEASES_REPO Default elevenmessenger/releases. |
| +# LCHAT_MAC_SIGNING_PROFILE |
| +# Name of an INSTALLED Developer ID provisioning profile to export with |
| +# (manual signing). Needed when no Xcode-managed "Mac Team Direct" profile |
| +# is cached locally: automatic export then tries to cloud-mint one, which |
| +# an API key cannot do (Developer ID profiles are Account-Holder-only), and |
| +# dies with "Cloud signing permission error" / "No profiles … were found". |
| +# Mint a profile via the ASC API (POST /v1/profiles, profileType |
| +# MAC_APP_DIRECT), drop it in ~/Library/Developer/Xcode/UserData/ |
| +# Provisioning Profiles/, and pass its Name here. |
| # |
| # Host tools: xcodebuild + notarytool/stapler (Xcode), and dmgbuild |
| # (`pip install dmgbuild`), which lays out the install window from |
| @@ -85,8 +94,22 @@ cat > "$TMP/export-options.plist" <<PLIST |
| <string>developer-id</string> |
| <key>teamID</key> |
| <string>$TEAM_ID</string> |
| +$(if [ -n "${LCHAT_MAC_SIGNING_PROFILE:-}" ]; then cat <<MANUAL |
| + <key>signingStyle</key> |
| + <string>manual</string> |
| + <key>signingCertificate</key> |
| + <string>Developer ID Application</string> |
| + <key>provisioningProfiles</key> |
| + <dict> |
| + <key>com.elevenmessenger.messenger.mac</key> |
| + <string>$LCHAT_MAC_SIGNING_PROFILE</string> |
| + </dict> |
| +MANUAL |
| +else cat <<AUTO |
| <key>signingStyle</key> |
| <string>automatic</string> |
| +AUTO |
| +fi) |
| </dict> |
| </plist> |
| PLIST |