Xcode with iPhone 4 Development: The executable was signed with invalid entitlements.

Question!

The complete error message is:

The executable was signed with invalid entitlements.

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).

I have already spent a couple of hours resolving this error message but haven't resolved it yet. Basically, I have made my iPhone-4.0 for development and installed the valid provisioning profile from my account on developer.apple.com.

We have our main application, which is signed with the same provisioning profile, and it works fine, but when I try running application given in the http://teachyourselfiphone.com/ book for learning and testing purposes, it just doesn't work.

I have tried all of the following things, but nothing works.

  1. The executable was signed with invalid entitlements
  2. http://jomnius.blogspot.com/2010/11/executable-was-signed-with-invalid.html

Could anyone please help me to get rid of this?



Answers

I had this same issue ... I figured this out... There are apparently a lot of things that can happen to cause this issue. This was my particular flavor so you may or may not find this useful...it is just one more thing to check. I thought I would post the solution so when I am trying to figure this out next year I can find my post and fix it ;) Also if anyone else see a similar problem they can find this and maybe it is what they are seeing... My particular problem was I did not catch all the places that need to be updated. I got two out of three which may be close but we're not playing horseshoes here ;) Before you ridicule me just remember hind sight is 20/20...and I'm old and can't remember stuff I probably figured out last year.

There are several areas to check to make sure your provisioning profile is updated.

First there is the new developer identity certificate. Make sure this is put into your keychain. Mine is under Keychains - login in the Key Chain Access app on the Mac. Next you need the new provisioning profile on the device. Delete out your expired ones and get a new one generated through the use of your new developer identity. Do this through the XCode4 Organizer. Trust the warnings in Organizer that a valid certificate cannot be found... Finally, this is the one I missed, update the Library Provisioning Profiles! Again through XCode4 Organizer above "DEVICES" there is a "LIBRARY" section select "Provisioning Profiles" delete out your old expired profiles and add your new provisioning profiles.

The big hint was in the project build settings - the code signing area tells you what provisioning profile the signing matches. Mine said "currently matches..." and then listed an older profile that was different from the new one I was putting on the device. Even though that older profile was not expired it was - I believe - based on the old developer identity which had expired last night. So I think the problem was XCode was signing with that older provisioning profile and the device had the newer provisioning profile and so I get the really clear error message above ;) ...

I was looking for this for hours and hope I can save someone a bit of time. I am sure I will be looking for this next year when I screw it up again.

Note to self: I told you that you were going to mess this up next year...and here it is next year and you are reading this post.

This same post is at: https://devforums.apple.com/message/425569



I had a similar issue when I updated my phone to an iPhone 6 and restored it from my iPhone 4S backup. I wound up with provisioning profiles from my old phone which had to be deleted. You can no longer remove profiles in Settings->General->Profiles in iOS 8 - look here for instructions: Removing provisional profile with ios 8 and Xcode 6.0.1. I had to then manually download the team provisioning profile and install it using the same instructions as above.



If you didn't change anything related to certificates (didn't replace or update them) just do a Product -> Clean. It helped me several times. (Xcode 6.2)

By : azimov


This video can help you solving your question :)
By: admin