I got this error with Xcode 5 when I try to run the app on my device.
The executable was signed with invalid entitlement
It work
I was able to fix this by toggling on/off "Game Center" entitlement in Xcode 5 :-)
Had some issue. Resolve: go to right target -> capabilities -> for me there was issue with "In-App Purchase" and button to fix it. Off-on operation fixed issue.
Restarting Xcode was what worked for me.
In my Case, i had to accept the Apple Developer License Agreement.
Login to apple developer account and observe the notification message similar to below.
"The Apple Developer Program License Agreement has been updated. In order to access certain membership resources,**** must accept the latest license agreement by June 28, 2016."
Earlier, i was not able to add/edit iCloud Containers to the App ID though i changed/checked Capabilities, Provisioning Profiles, Certificates etc. After agreement to the contract, things started working smoothly.
Hopefully, it would save someone's valuable time.
If restarting xcode doesn't work make a new provision profile and be sure to include your test devices.
The answers here seem a bit inadequate so I'm adding my two cents:
The real solution is that there is generally a mismatch between what is stored in your provisioning profile (check at developer.apple.com -> members -> certificates -> the cert you're using [be sure to check if dev/production) and what is enabled in your app (double click project name), under horizontal menu select'Capabilities' (next to 'General').
If you've recently changed one of these, be sure to refresh your certificates under XCode -> Preferences -> Accounts -> Details -> Refresh Icon and restart XCode.