问题
I am getting error:
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016).
on DISTRIBUTION CERTIFICATE & PROVISIONING
Profile. Earlier, I was able to install the build using distribution profile, But, now I am not able to do so. It gives above error.
Below is my entielement contents:
<?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>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.myapp.xyz</string>
</array>
</dict>
</plist>
I have enabled PushNotification
in my appid.
From past 2-3 days, I have gone through many such post on stackoverflow and tried various solutions. But none of them has worked. Things I have done to resolve,
- Created a new cert and provisionf profiles
- Removed old certs from keychains and installed new ones
- Removed old provision profiles from system and installed new ones (Manully and automatically through
Xcode->Preferences->account->view Details-> download all
) Restareted XCode
many times after removing certs adding new ones- Clean and build project
- Cleared derived data
- Kept Provisioning profile on automatic (but it builds with developer provisioning profile, dont know why)
According to error, I have matched my provision profile Application services (as per my appID in developer portal) with build capabilites in XCode
. But its not working.
Does that .entitlements
file has to do anything with "Build capabilites"? I tried removing .entitlement
once but no luck.
UPDATE: I created a new project, New appID (The default ones are enabled. In-app and game center) and new distribution provisioning profile. Still gives same error. :(
UPADTE 2: Adding image of keychain
回答1:
Look into the test target, the team should be the same in both the test target and the main target.
回答2:
Issue is due to distribution provisioning profile try using development or Ad-Hoc provisioning,Hope it's work ,Good luck
回答3:
In my case, before the build I have added a key ITSAppUsesNonExemptEncryption
in Info.plist
which may not included in the provisioning profile. After removing ITSAppUsesNonExemptEncryption
from Info.plist
I am able to build successfully.
来源:https://stackoverflow.com/questions/37020624/the-executable-was-signed-with-invalid-entitlements-0xe8008016-distribution-ce