App Store upload rejects the build for inadequate entitlements
Invalid code signature due to inadequate entitlementsShort answer
Your app claims an entitlement that its provisioning profile does not authorise. Dump the entitlements from the signed app and from the profile, then compare them. Remove the entitlement you do not need, or enable the capability on the App ID and refresh the profile. Wildcards are only valid in the profile.
Fix it fast
1Find out which cause you have
List what the app claims and what the profile allows. Each claimed entitlement must appear in the profile.
codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - - security cms -D -i MyProfile.mobileprovision -o /tmp/profile.plist plutil -extract Entitlements xml1 -o - /tmp/profile.plist2Match what you see, then jump to its fix
- 1
A key printed by the first command is missing from the profile's Entitlements outputThe app claims an entitlement the profile does not authoriseFix - 2
A value in the codesign output ends in an asterisk, such as TEAMID.*A wildcard was written into the app's own entitlementsFix - 3
The new entitlement is in the entitlements file but missing from the profile you export withA capability was added under manual signing and the profile was never refreshedFix
- 1
What does the error look like?
Invalid code signature due to inadequate entitlements
Cause 1 of 3
The app claims an entitlement the profile does not authorise
1Check
The profile's Entitlements list is an allowlist. Every entitlement the app claims has to be in it. The reverse is fine: the profile may allow more than the app uses.
grep -n -A3 'CODE_SIGN_ENTITLEMENTS' MyApp.xcodeproj/project.pbxproj | head2Fix
Delete the key from the .entitlements file if the app does not need it. If it does, enable that capability for the App ID and create or download a new profile that includes it.
# Target > Signing & Capabilities > remove the capability, or add it and let Xcode refresh the profile3Verify
Archive again and repeat the two dumps; every claimed key now appears in the profile.
codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - -Confirmed by developer.apple.com
Cause 2 of 3
A wildcard was written into the app's own entitlements
1Check
Wildcards such as TEAMID.* are valid in the profile only. The app's signature has to carry concrete values.
plutil -p MyApp/MyApp.entitlements2Fix
Replace the wildcard in the entitlements file with the real value, for example the full keychain access group with your bundle ID.
# In MyApp.entitlements, write the full value (TEAMID.com.example.myapp), not TEAMID.*3Verify
Rebuild the archive and dump the entitlements again.
codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - -Confirmed by developer.apple.com
Cause 3 of 3
A capability was added under manual signing and the profile was never refreshed
1Check
With manual signing you must do the capability configuration yourself. Xcode editing the entitlements file does not update a profile you downloaded earlier.
security cms -D -i MyProfile.mobileprovision | plutil -p -2Fix
Create or download a new distribution profile for the App ID after the capability is enabled, install it, and select it in Signing. Or switch the target to automatic signing so Xcode manages the profile.
# Target > Signing & Capabilities > tick Automatically manage signing3Verify
Archive again and compare the dumps.
plutil -extract Entitlements xml1 -o - /tmp/profile.plistConfirmed by developer.apple.com
How do I stop it coming back?
- Add capabilities only through Signing & Capabilities so the entitlements file and signing stay in step.
- Dump claimed and allowed entitlements in CI after archiving, and fail on any difference.
- Keep wildcards out of .entitlements files.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Mobile apps
Cannot change the App Privacy answers in App Store Connect
Publish Your App Privacy Responses?
Only the Account Holder, Admin and App Manager roles can answer the App Privacy questions.
2 causes, each with a fixMobile apps
App record creation fails because you lack permission
You cannot add a new app in App Store Connect as a Developer or limited user
Only the Account Holder, an Admin or an App Manager can create an app record, and Apple blocks it until the Account Holder has signed the latest agreement.
3 causes, each with a fixMobile apps
You cannot find the button to pull your app back from review
No 'remove this version from review' message appears on the version page
There is no button called Reject Binary.
3 causes, each with a fixMobile apps
Your Apple Account cannot sign in to App Store Connect
Sign-in to App Store Connect is refused for an account that should have access
App Store Connect does not open to every Apple Account.
3 causes, each with a fixMobile apps
Apple rejected the app under Guideline 4.3, Design: Spam
Guideline 4.3(b) - Design - Spam
Guideline 4.3 is Apple's duplicate rule.
5 causes, each with a fixMobile apps
App Store Connect rejects a screenshot because it has transparency
Images can't include alpha channels or transparencies.
App Store Connect does not accept screenshots that carry an alpha channel or transparent pixels.
2 causes, each with a fix