一键导入
code-signing-troubleshooting
Diagnose and fix common Apple and Google code-signing errors. Use this when a release build fails to sign, upload, or install.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Diagnose and fix common Apple and Google code-signing errors. Use this when a release build fails to sign, upload, or install.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use Apple's phased release for automatic updates on iOS — behavior, pausing, resuming, and interaction with manual updates. Use this when shipping production iOS builds.
Use Play percentage rollouts and iOS phased release to limit blast radius. Use this when planning or operating a production release.
Generate keystores, enrol in Play App Signing, and understand v1/v2/v3/v4 APK signature schemes. Use this when setting up Android release signing.
Manage Apple certificates, provisioning profiles, automatic vs manual signing, and fastlane match. Use this when setting up iOS release signing.
Publish Android apps to Amazon Appstore, Huawei AppGallery, Samsung Galaxy Store, and deal with HMS vs GMS. Use this when targeting non-Google Android markets.
Release to the App Store using App Store Connect, TestFlight, metadata, and screenshots. Use this when shipping an iOS build to Apple.
| name | code-signing-troubleshooting |
| description | Diagnose and fix common Apple and Google code-signing errors. Use this when a release build fails to sign, upload, or install. |
Signing errors are almost always one of five categories: wrong certificate, wrong profile, wrong entitlements, wrong bundle id, or a stale cache. Work through this skill top-to-bottom — the order matches how often each fault occurs in practice.
Xcode and Gradle both truncate signing errors. Re-run with verbose flags:
# iOS
xcodebuild -workspace Runner.xcworkspace -scheme Runner \
-configuration Release archive -archivePath out.xcarchive \
CODE_SIGN_STYLE=Manual -verbose | tee build.log
# Android
./gradlew :app:bundleRelease --info --stacktrace
Grep for error:, Signing Identity, and Provisioning Profile.
No signing certificate "iOS Distribution" foundCause: no matching certificate in the keychain.
Fix:
security find-identity -v -p codesigning
# Expect at least one "Apple Distribution: <Team>" line.
bundle exec fastlane match appstore --readonly
If match reports a cert exists remotely but locally missing, delete ~/Library/MobileDevice/Provisioning Profiles and re-run.
Provisioning profile doesn't include the entitlementCause: entitlements file references a capability not enabled on the App ID.
Fix:
bundle exec fastlane match nuke appstore && bundle exec fastlane match appstore.Runner.entitlements matches what the portal shows.The executable was signed with invalid entitlementsUpload to App Store Connect rejected. Usually get-task-allow = true leaked into a release build (debug entitlements in a release build). In ExportOptions.plist:
<key>signingStyle</key>
<string>manual</string>
<key>method</key>
<string>app-store</string>
Never set -allowProvisioningUpdates on a release export; it can pull a development profile.
App Store Connect reported an error uploadingOften transient. Retry with the API key, not password:
xcrun altool --upload-app -f MyApp.ipa \
--apiKey "$APP_STORE_CONNECT_KEY_ID" \
--apiIssuer "$APP_STORE_CONNECT_ISSUER_ID"
If it persists, check Apple System Status before assuming a local fault.
Your APK or Android App Bundle was signed with a key that is not in Play ConsoleCause: uploading with a new keystore.
Fix: revert to the original upload key. If lost, Play Console → App integrity → Request upload key reset (wait 1–2 days). Do not rename bundles to work around this — it creates a duplicate listing.
Signature verification failed: v1 signature scheme missingCause: minSdk < 24 but v2+ only. Fix in app/build.gradle.kts:
android.signingConfigs.getByName("release") {
enableV1Signing = true
enableV2Signing = true
enableV3Signing = true
}
INSTALL_PARSE_FAILED_NO_CERTIFICATES on deviceThe APK is unsigned or signature corrupted. Re-sign:
apksigner sign --ks upload-keystore.jks \
--ks-key-alias upload \
--ks-pass env:KEYSTORE_PASSWORD \
--out app-release-signed.apk \
app-release-unsigned.apk
apksigner verify --verbose app-release-signed.apk
When nothing else explains it, clear:
# iOS
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles/*.mobileprovision
# Android
./gradlew clean
rm -rf ~/.gradle/caches/transforms-*
Re-run the signing lane from scratch.
# Inspect an IPA's embedded profile
unzip -p MyApp.ipa "Payload/*.app/embedded.mobileprovision" \
| security cms -D | plutil -p -
# Inspect an AAB
bundletool dump manifest --bundle=app-release.aab
bundletool dump resources --bundle=app-release.aab
# List signing identities
security find-identity -v -p codesigning
# Check APK signatures
apksigner verify --print-certs app-release.apk
diff the profile plists).match or supply readonly mode used on CI to prevent accidental regeneration.docs/signing-playbook.md for the next time.