Xcode error - The executable was signed with invalid entitlements - ios

I can build a game that I am developing in Objective-C no problem, and I can test run it when I hook my iPhone onto the macbook. But when I try to test an angular phonegap app through Xcode, I get the error:
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).
I tried some settings, but it looks to me like the settings forsigning are the same as for the objective-c game. What's the catch?

I don't have an answer I was wondering if you ever found the solution to your problem. Since I can't leave a comment on your question. I'm entering it here.

Related

Entitlements for multiplatform applications in Xcode 14

When creating a Multiplatform Application prior to Xcode 14, Xcode would create a separate Entitlements-file for each target. Now, with Xcode 14, all targets use the same Entitlements file by default.
After adding the HealthKit capability to an Xcode 14 project and populating the "Privacy - Health Update Usage Description" Key with a string in Info.plist, then prompting a HealthKit authorization request, the screen asking the user to agree to the App using HealthKit data does not pop up. Moreover, the following error is printed in the console: Health request display failed: Missing application-identifier entitlement.
In an effort to fix this problem, I edited the Entitlements file manually to look like this:
Adding the application-identifier entitlement to the Entitlements file manually fixes the issue, however, as the same Entitlements file is also used by the macOS target, Xcode fails to automatically sign the app for macOS and gives the following error:
Provisioning profile "Mac Team Provisioning Profile: com.xx.xx" doesn't include the application-identifier entitlement.
Here you can see the error given in Signing & Capabilities:
What is the correct approach here? Should I manually create a second Entitlements file and separate them? If so, how would this be done? Or is there something else I'm missing?
Any help would be greatly appreciated.
Testing on a real device, without manually editing the entitlements file, the error disappears and the HealthKit permission request is shown appropriately.
Therefore, I believe the behavior above is just a Xcode/Simulator bug in the current beta.

iOS - How can I remove entitlements from a Framework?

I'm getting dreaded errors like this:
ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements
in your app bundle signature do not match the ones that are contained
in the provisioning profile. According to the provisioning profile,
the bundle contains a key value that is not allowed:
'XXXXXXXX.com.xxxxxx.xxxxxx.xxxxx' for the key
'application-identifier' in
'Payload/XXXXX.app/Frameworks/Zip.framework/Zip'"
and this
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application
bundle's signature contains code signing entitlements that are not
supported on iOS. Specifically, value 'development' for key
'aps-environment' in
'Payload/XXXXX.app/Frameworks/iOSDFULibrary.framework/iOSDFULibrary'
is not supported."
And it only happens when archiving and uploading to the appstore. Development on a physical device works just fine.
I already tried everything on this post without success ERROR ITMS-90164/90046: Invalid Code Signing Entitlements
My specific scenario is that the errors are happening on manually installed Frameworks, while the Cocoapods frameworks seem to be fine.
I just also noticed this which made me come and create the question. Right before uploading the build to the App Store, on the final summary page, I noticed that Cocoapods frameworks look like this:
While the problematic frameworks (non cocoapods) look like this:
Those extra entitlements look like are to blame, but I can't figure out how to remove them.
EDIT Aug 3:
Just wanted to add that I found official documentation about entitlements troubleshooting here here and here
But it all talks about the app itself and not the frameworks.
Can anyone help me figure this out?
Thank you
I am facing similar issue for my app. I have used xcode10.1 to generate xcarchive and upload ipa from xcode instead of using application loader.
ERROR ITMS-90164/90046: Invalid Code Signing Entitlements has multiple solutions.

Xcode invalid entitlements on very old iOS project

The iOS project I've been tasked with upgrading was written in 2013, using Objective-C and iOS 7 SDK. I updated it for the simulator to work with iOS 10.3 but have run into a problem with entitlements when compiling for a device (which I think will be an issue when packaging for the store).
The error is the standard
The entitlements specified in your application’s Code Signing
Entitlements file are invalid, not permitted, or do not match those
specified in your provisioning profile. (0xE8008016).
but as far as I remember, iOS 7 did not use entitlements in the same way (there is no entitlements file in our old repo). How do I fix it if the project was originally so old? Everything matches as far as I can tell so I don't know why it's causing an issue.
Maybe you could try one of that:
Clean your certificate and make it again on Member Center
Look your in Target> Build Settings > Code Signing > Code Signing Entitlements to confirm the code signing is correct or updated.
Go to your Target > Capabilities. Toggle On/Off or Off/On one of the capabilities.
In this case it was overlooking a build setting that Xcode doesn't seem to fill in.
For developing on devices at least, I had to add the path to the entitlements file in the Project section of build settings, not just the Target. This is under the "Code signing entitlements" row. After adding that entry, I was able to test on my phone again.

After upgrading to Sierra, "The executable was signed with invalid entitlements."

The entitlements specified in your application’s Code Signing
Entitlements file are invalid, not permitted, or do not match those
specified in your provisioning profile. (0xE8008016).
I am specifically asking what can be done about this Xcode error in the case that the OS has been upgraded to Sierra, because that is the only significant thing in my situation that I believe has changed recently
EDIT: my capabilities settings have not changed, so I'm sure it's not that. I have found that it will work with Automatic Code Signing checked, but I'm still curious why all of a sudden it is necessary for me to check this.
Go to the 'Capabilities' tab in your project settings and see if the all of them are in order. The PassTypes entitlement was added anew to Xcode 8, whereas previously this didn't need to be a specific entitlement - it was sufficient if it was turned on in developer.apple.com.
When I first migrated to Xcode 8, I got a warning with a fix issue option.

Xcode 6 invalid entitlements in my project

I want to distribute my app, but when I run it it shows me message:
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016).
I already watch my distribution account and Capabilities in Xcode and
entitlements in them are the same. In what can be problem?
I also get this exception few times when I did something with provisioning profiles or capabilities, In my case its always in iCloudkit (xcode 6) issue, for some reason in app id (if you check in developer center) it assigned invalid or unwanted icloud containers to the app id. So i remove them and only added one correct container to fix this issue.
I had this problem recently, You will find many questions here with the same issue, check this question for the approved answer The executable was signed with invalid entitlements (iPhone build)
For me, I didn't do this. I tested the app on the device using the development certificate and the ad-hoc one, Then submitted it using the disruption certificate after making sure that there is nothing wrong with my certificates.
You probably need to check your Bundle ID value in both your .plist file and also here:
(This really is the most developer-unfriendly environment in use in 2016...)

Resources