Ios – Can’t Resolve Error: The executable was signed with invalid entitlements for Debug in xcode 4.2

buildcode-signingiosxcode

I am trying to build for debugging. I am getting the 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.

This worked every day until last night. The last time it worked was when I clicked on Always Allow on the codesign question that pops up when you build where it says it wants to sign using key "my key name" in your keychain.

I have an entitlements plist already that I used for creating my ad hoc distribution. I have updated build settings for Code Signing Entitlements for Debug to include this Entitlements.plist file.

I have verified that my profiles are up to date. My Team Provisioning Profile had expired, so I renewed it. I even tried creating new profiles. Still didn't help

I have tried both my developer profile and my distribution profile in the build settings under Code Signing Identity for Debug.

I am completely stuck. Can anyone give me new advice?

Best Answer

I finally got this to work.

1) In the left column of xcode, I clicked on my project name.

2) I clicked on Build Settings

3) There are 4 columns: Resolved, myProjectName (with an orange icon), myProjectName (with an xcode icon), and IOS Default.

4) In the column with the orange icon and the row for Code Signing Entitlements (Debug row), I removed the Entitlements.plist file name from that column, but left it in the column with the xcode icon.

5) In the row for Code Signing Identity (Debug), I chose iPhone Developer in both the column with the orange icon and the xcode icon. I used the Automatic Profile selector.

This fixed my problem. Please not the other things I did in my question as these may also have had an impact.