Ios – The executable gets signed with invalid entitlements in Xcode

code-signingiosprovisioning-profilexcode

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 worked fine with Xcode 4.x. Anyone knows how to get rid of the error?

enter image description here

Best Answer

I grappled with this issue for an hour, and finally found a fix. Turned out the Development Team was different in ProjectTarget and ProjectTests.