The executable was signed with invalid entitlements 0xe8008016 - Distribution certificate

JiteshW picture JiteshW · May 4, 2016 · Viewed 22.2k times · Source

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,

  1. Created a new cert and provisionf profiles
  2. Removed old certs from keychains and installed new ones
  3. Removed old provision profiles from system and installed new ones (Manully and automatically through Xcode->Preferences->account->view Details-> download all)
  4. Restareted XCode many times after removing certs adding new ones
  5. Clean and build project
  6. Cleared derived data
  7. 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 .entitlementonce 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 keychainenter image description here

Answer

Mici  picture Mici · Nov 7, 2016

Look into the test target, the team should be the same in both the test target and the main target.

test target team

Error 0xe8008016 - Distribution certficate