Installation errors
Fix a Provisioning Profile and Signing Certificate Mismatch
Prove whether the certificate that signed an iOS app is authorized by its embedded provisioning profile, then repair only the mismatched signing inputs.
A certificate/profile mismatch means the certificate that signed—or is about to sign—the app is not one of the certificates authorized by the provisioning profile for that target. Do not repair it by guessing from profile names or by revoking every certificate.
Keep four objects separate:
certificate
+ matching private key
+ provisioning profile
+ signed app artifact
A certificate installed on a Mac is not automatically a usable signing identity. Apple defines an identity as a certificate paired with its corresponding private key. A valid certificate from the same team is also not automatically authorized by a specific profile.
What each piece of evidence proves
- Certificate present: the public certificate exists in a Keychain or file.
- Signing identity present: the certificate and its matching private key are available together to the signing process.
- Profile authorizes certificate: the profile’s
DeveloperCertificatesset includes that certificate. - App was signed with certificate: the final app signature actually identifies that certificate/team.
These are four separate facts.
certificate present
!= private key present
!= profile authorizes certificate
!= final IPA used that identity
Apple’s TN3125 describes DeveloperCertificates as the profile’s answer to “who is allowed to sign code?” Apple also warns that the readable provisioning-profile property list is diagnostic material, not a stable product API; modern systems use the DER-encoded profile as the source of truth.
Preserve the failing artifact first
Work from the exact IPA that failed or was delivered:
shasum -a 256 ClientBuild.ipa
mkdir ClientBuild-unpacked
unzip -q ClientBuild.ipa -d ClientBuild-unpacked
APP_PATH=$(find ClientBuild-unpacked/Payload -maxdepth 1 -name '*.app' -print -quit)
Record filename, checksum, version/build, intended Apple Developer team, and distribution method. Do not edit the extracted app while diagnosing it.
Step 1: identify who actually signed the app
codesign --display --verbose=4 "$APP_PATH" 2>&1
codesign --verify --strict --verbose=4 "$APP_PATH"
Record the signing authority, TeamIdentifier, code-signing identifier, and verification result. A successful local verification proves the inspected signature is internally valid under the requested check; it does not prove the embedded profile authorizes that identity.
For the canonical signature-evidence workflow, use Check an IPA’s Code Signature.
Step 2: decode the embedded profile
security cms -D \
-i "$APP_PATH/embedded.mobileprovision" \
-o /tmp/client-profile.plist
plutil -extract Name raw -o - /tmp/client-profile.plist
plutil -extract UUID raw -o - /tmp/client-profile.plist
plutil -extract ExpirationDate raw -o - /tmp/client-profile.plist
plutil -extract Entitlements.application-identifier raw -o - /tmp/client-profile.plist
plutil -extract DeveloperCertificates xml1 \
-o /tmp/profile-certificates.plist \
/tmp/client-profile.plist
Do not conclude from the profile name. Compare the actual app identity, team context, profile application identifier, certificate authorization, expiry, entitlements, and device set where applicable.
Step 3: compare exact certificate identities
TN3125 shows that the certificate records in DeveloperCertificates can be extracted and inspected. Use serial numbers and fingerprints rather than display names alone.
For example, after extracting one certificate record to a .cer file, compare its SHA-256 fingerprint with the signing certificate you expect. The goal is a positive identity match, not “both say Apple Distribution.”
A common failure is:
new Apple Distribution certificate created
→ old provisioning profile still authorizes previous certificate
→ build machine uses new identity
→ profile and signature disagree
Another is the opposite:
profile authorizes current certificate
→ build machine has only public .cer
→ matching private key is missing
→ no usable signing identity exists
Step 4: verify the private key on the signing machine
List usable code-signing identities and installed certificates separately:
security find-identity -v -p codesigning
security find-certificate -a -c "Apple Distribution" -Z
security find-certificate -a -c "Apple Development" -Z
If a certificate appears in find-certificate but not as a usable identity, investigate the matching private key and Keychain access. Downloading the .cer again does not recreate a private key that was generated on another machine.
Apple’s certificate technote explains that the CSR process creates the key pair first; importing the issued certificate later completes the identity only when the matching private key is present.
Step 5: rule out neighboring failures
A certificate/profile mismatch is not the same as:
- Bundle ID or entitlement mismatch: app identity is outside the profile authorization. Use Bundle ID and Profile Mismatch.
- Expired certificate: the identity existed but its certificate validity ended. Use Expired iOS Distribution Certificate.
- Missing signing identity: Xcode/CI cannot assemble certificate + private key + Keychain access. Use No Signing Certificate Found.
- Expired profile:
ExpirationDatein the embedded profile is past. Use Expired Provisioning Profile.
Do not replace several assets at once before you know which branch is true.
Common real causes
- A new certificate was created after the profile was generated.
- The build selected a certificate from another team.
- A similarly named profile belongs to another App ID.
- CI imported the
.cerbut not the private-key-bearing identity. - Manual export maps the app to the wrong profile.
- The main app was repaired but a nested
.appexstill uses an old profile/certificate pair. - An authorized re-sign applied the outer profile but not the correct per-target mappings.
- Xcode automatic signing and a parallel manual profile set are competing for ownership.
Inspect nested targets explicitly
Extensions, widgets, App Clips, and nested apps can have their own bundle identifiers, profiles, and signing requirements. Enumerate them:
find "$APP_PATH" -type d \
\( -name '*.appex' -o -name '*.app' \) -print
Inspect each signed target rather than assuming the main app proves the whole IPA. A correct outer signature does not repair a nested certificate/profile mismatch.
Choose the minimum repair
Use the smallest repair supported by the evidence:
- Use an already-authorized certificate and its matching private key when that is the intended signing identity.
- Regenerate or edit the intended profile to authorize the correct current certificate when the profile is stale.
- Return to Xcode-managed signing when automatic signing owns the project instead of building a parallel manual profile set.
- Perform an authorized re-sign only when the app owner controls compatible signing assets and every target can be mapped correctly.
For an Ad Hoc profile, Apple’s current workflow selects one distribution certificate, the matching App ID, and registered devices. For a Development profile, the workflow can select one or more development certificates and devices. Use the profile type that matches the actual distribution method.
Fastlane’s resign can apply a signing identity and provisioning profile mappings to an existing IPA, but automation cannot make incompatible assets compatible. How to Re-sign an IPA Safely owns that boundary.
Verify the replacement, not just the portal
After the repair:
- checksum the replacement IPA;
- verify the main app and nested signatures;
- decode every applicable embedded profile;
- confirm profile UUID/expiry/team/App ID;
- confirm the signing certificate is authorized by
DeveloperCertificates; - confirm device membership where the distribution method requires it; and
- acceptance-test the exact delivered checksum.
Run the iOS Distribution Checklist before replacing the client link. The goal is not “a new certificate exists”; the goal is one verifiable artifact whose signature, profile, app identity, device authorization, and delivery record agree.
Related next steps
- Check an IPA’s Code Signature and Signing Certificate →
- Inspect a Provisioning Profile Inside an IPA →
- Fix a Bundle ID and Provisioning Profile Mismatch →
- Fix an Expired iOS Distribution Certificate →
- Fix “No Signing Certificate Found” in Xcode or CI →
- How to Re-sign an IPA Safely →
- What Is an Ad Hoc Provisioning Profile? →
- tools ios distribution checklist →
Sources
- Apple Developer — Tn3125 Inside Code Signing Provisioning Profiles
- Apple Developer — Tn3161 Inside Code Signing Certificates
- Apple Developer — Storing An Identity In The Keychain
- Apple Developer — Create An Ad Hoc Provisioning Profile
- Apple Developer — Create A Development Provisioning Profile
- Fastlane Documentation — Resign