Invalid Code Signing Entitlements [duplicate] - iphone

This question already has answers here:
App Submission Error - Invalid binary - Invalid Code Signing Error
(3 answers)
Closed 5 years ago.
I ve followed all the procedure that app store support placed for help yet when ever i sumit the app after upload the status becomes "invalid binary" with following msg in the mail.
Invalid Code Signing Entitlements - Your application bundle's signature contains ubiquity code signing entitlements that are not supported.
Specifically, value "( 79FWT492R4.* )" for key "com.apple.developer.ubiquity-container-identifiers" in is not supported.
I will be thankful if someone help
Thanks
MGD

Well i really dont know why Apple has set so many complications for the app submission.Now coming towards the solution, What i did was, I used the same APP ID but i reconfigured it by unchecking the iCloud option, then i renewed the provision and distribution profiles downloaded them, deleted the old profiles from the xcode organizer added the new ones (those i downloaded after renew), first my app started giving error during the that "key does not match .... " then i went to the built info of the target there i simply set "iphone distribution" in code signing, Thats it i build the app and uploaded via organizer, and it went with the status "Waiting for Review" :)
Cheers
MGD

Just to clarify the answer, which I found confusing. I had ths problem just now (October 2011) and solved it quickly.
I thought I had to revoke my own distribution certificate, but this clarifying note saved me (can't find the source right now but THANK YOU)
Go to App IDs in the provisioning portal. Scroll to the bottom. Click configure on the row that represents your app’s ID. Uncheck Enable for iCloud. Click Done.
--
Now you can just regenerate your distro provisioning prof (no need to create a new one) and redownload it into Xcode, reubild and resubmit. i hope this helps people

There is indeed no more option to disable iCloud in Provisioning Portal. But apparently Apple has noticed that the iCloud entitlements in distribution certificates may cause trouble during submission and has recently REMOVED these entitlements from the certificates again.
So help is near: Just re-create your distribution certificate and you'll see that it doesn't contain the offending keys any more. Hope that helps.

Under the Code Signing section in my Build Settings, Xcode had selected iOS Developer for Release instead of iOS Distribution. Selecting the correct distribution profile for Release resolved this issue for me.

My solution was to remove the provisioning profile entries. Evidently in addition to the Code Signing entries, now there are also Provisioning Profile entries and mine was stuck on an old version or something. Clearing that fixed the problem.

Related

Ios Distribution and validation

I get this error when trying to validate, now theres tons of these questions, the problem is, none of their solutions have worked.
The top highlighted one is my distribution provisioning file thats associated with the project in question.
you can even see it's online.
so I have the profile, I have the app ready for uploading (how do you change the date for when it can be available on the app store AFTER you have said "yes these details are right, now lets get ready to upload?").
But I can't validate. every time I log in to "validate" I get that error. I have all the profiles required I have tripple checked every thing, but being VERY NEW to IOS dev, I am sure I missed some crucial step.
Please help.
1) Have you created a Distribution Certificate and downloaded it?
2) Have you created App Store provisioning profile?
3) Are the code signing identities have been properly setup in your project?
If yes to the above then try manually downloading the provisioning profile from the developer portal and restarting XCode.

Xcode says: "Identity ___ is not trusted." and won't allow me to submit my app

I've been living the nightmare of trying to submit an app to the iTunes store... The newest massive waste of time is an error message that I get when I try to validate or distribute my archive from the "organizer".
The exact message is:
My Xcode is version 4.3.2. I'm pretty sure my WWDR is installed, because this has never been an issue before. I also tried to re-install it just to be safe.
The most frustrating/confusing part is that I JUST submitted my app successfully two weeks ago and nothing was changed. My app was rejected for meta-data reasons. I fixed those issues, re-installed one of my plugins, and now this.
Any suggestions? Even a link to some helpful documentation would be great. I've found the Apple developer docs extremely confusing and UN-helpful.
EDIT1:
I think I may have gotten closer to the problem. I changed some of the build settings and now my build fails with this error:
Code Sign error: Certificate identity 'iPhone Distribution: [my name]' appears more than once in the keychain. The codesign tool requires there only be one. I want to fix this but I'm not clear on which code signing profile should be set where. There are different settings depending on whether I click the "project" icon or the "target" icon and each of those has four different choices. Do all of these require code signing? Can anyone give me an example of a working configuration?
EDIT2:
I think I maybe found the problem. There is a small note that says my Distribution profile has no provisioning portal. I've been downloading and installing new .mobileprovision files but they all say "Developer". I think just need to figure out to download a new distribution profile.
SOLUTION:
Thanks to some pointers from Saad (see below), I figured out what was wrong. I was using the auto-select option for code signing, and the only distribution profile had an invalid provisioning profile. This happened very quietly, and I'm not sure why. I only noticed it when I went back into the provisioning portal to create a new distribution profile. After installing this, everything works.
your provisioning profile is not properly set
Code Sign error: Certificate identity 'iPhone Distribution: [my
name]' appears more than once in the keychain. The codesign tool
requires there only be one.
Open Applications > Utilities > Keychain Access and search for your Distribution certificate. Sometimes the Xcode Organizer decides to generate a new certificate for you and invalidates your old one, but does not remove it from your keychain. Remove the expired/older certificate and quit/re-launch Xcode (make a backup first, in case, by dragging to Desktop or Exporting). That should at least clear up part of your problem.
As for the provisioning profile, if that still is a problem, I'd manually go into the iOS development center and download the App Store Distribution Provision Profile for your app, removing all other provisioning profiles, until you figure this out. Quitting and relaunching Xcode when dealing with certs/provisioning profiles is something I've always had to do.
project identifier and your profile identifier must match

iPhone developer doesn't match any valid certificate (Xcode)

Hi I've kind of been cornered by apple here, I submitted a technical support query, one of the free ones thats comes free when you pay into the developer program only to be told that they won't be in the office until after Thanksgiving, a problem I overlooked as I am from Ireland. I really need help on this as I've tried looking in forums and I've tried solutions that were given for similar problems but I still can't crack it.
The screenshot images can be seen on this page..
http://www.heffernanwebservices.ie/blank.html
Here it goes...
DESCRIPTION OF PROBLEM On trying to build my project "Mulligan IRL" in xcode i get the following error " Code Sign error: The identity 'iPhone Developer: Cian Heffernan (8ELM27DL8F)' doesn't match any valid certificate/private key pair in the default keychain"
[Screenshot 1]
When I navigate to code signing in the build settings of the project i can see that when I click code signing identity for iphone developer or iphone distribution it has "(no profiles currently match) beside them. I then headed to the keychain access window in utilities and look in certificates and find that both the developer and distribution certificates will not expire until next August and November. Next I headed to the organizer in xcode. I see in provisioning profiles I have 8 profiles there! I don't know why I have so many.(2nd attachment)
[Screenshot 2]
As you can see ONE of the iOS team provisioning profiles will expire in 11days so I just tried to renew that. When I try this I get an error:(3rd attachment)
[Screenshot 3]
I then head to the provisioning portal to see why it wasn't found but I can see the profile. (4th attachment)
[Screenshot 4]
I have no idea why I am getting this error. I would appreciate any help on the matter.
For certificate to be valid it needs to be associated in your Keychain with a private key. Find the "iPhone Developer..." certificate in your Keychain and see if it's got a private key associated with it.
This can occur when you develop on two or more computers. You need to export the certificate+private key pair from the computer where you generated the private key first. Then import it onto all computers you do development on.
See Apple's Transferring Your Identities for more detailed info.
This could be caused by not having the private key associated with your certificate in your keychain. You can verify this by going to Keychain Access and choosing "Certificates" from the "Category" area at the bottom left. If your developer certificate does not appear when filtering that way, you are missing the private key for it.
If this is the case, you'll have to add your private key to the keychain, or else just reject and re-issue your development certificate with a new private key (you can find steps for this in the provisioning portal.)
a useful link from Apple about the submission process. hope it helps
I was using AppCode, but for me simply adding a new Keychain via Keychain Access called iPhone Developer allowed me to start building in AppCode.
Apple has a great article regarding Certificates and Provisioning-Profiles,
with excellent troubleshooting:
iOS Code Signing Troubleshooting
The most useful part I found was regarding cleanup of old provisioning-profiles from Xcode:
"Keep Your Profile Library Clean
...You need to manually remove provisioning profiles you are not using,
otherwise, Xcode will reimport potentially old or duplicate certificates into the keychain
and that can cause build errors."
And as a weapon of last resort, you can use this procedure:
How do I delete/revoke my certificates and start over fresh?

The entitlements specified...profile. (0xE8008016). Error iOS 4.2

I am getting the 'dreaded' error The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016). when trying to deploy my first app to an un-jailbroken device on iOS 4.2.6 (Verizon). The thing is, I do not have a Entitlements file in my project, as I am not distributing it at all, only putting it on one device. I have gone through all the hoops and loops apple puts you through (certificate, device, provisioning) down to the letter, and I cannot figure out what is going wrong.
Can anyone please help me with this problem?
Just came across this issue myself, the problem was that I had a Entitlements.plist file in the project as part of an ad hoc distribution, and its get-task-allow (ie. 'can be debugged') property was set to NO - setting this to YES fixed the issue and allowed the app to run from Xcode4 on the device in development.
Naturally need to set it back to NO for ad hoc distributions, but just thought I'd mention it in case anyone else comes across the same problem.
I had this issue with Xcode 4.2.1.
For me it was nothing to do with Entitlements file, or Ad-hoc...
I was returning to and old project, and I'd forgotten to add my new iPhone to the provision.
Silly mistake, but also a silly corresponding error message... :-/
If you're using react-native, make sure that the Test target has the same provisioning profile as the main one.
I've had this issue with the iCloud entitlements. My problem was that I forgot to enable iCloud for my App ID in the Provisioning Portal.
After enabling iCloud for your App ID, you will need to recreate the provisioning profiles.
Keep your entitlements file in Target> Build Settings > Code Signing > Code Signing Entitlements.
Go to Target > Capabilities.
Toggle On/Off or Off/On one of the capabilities.
Run.
What worked for me was to completely delete the entitlements file, from the groups list, and from the Build Settings in both Project and Target. Then I recreated the entitlements from the Summary tab in the target, and it loaded fine without any error messages.
Just putting in my 5 cents here. For me none of the above worked, so I was forced to stress down and actually look at every part of the process with fresh eyes.
In rushing this I forgot that I was trying to install my app on a totally new device.
So my error was that I hadn't updated my provisioning profile by ticking off my new device int the "Devices" section of the provisioning profile setup in the Provisioning Portal.
Apparently not including your device in the provisioning profile also generates this error message.
None of the many answers fixed the 0xE8008016 Error for me.
But when I chose "Automatic Device Provisioning" in Xcode 4 > Organizer > Devices > Provisioning Profiles, it finally worked.
In my case it was a stupid mistake. I incorrectly set the "Run" scheme to use the "Distribution" build configuration instead of the "Debug" or "Release" one.
Stupid mistake, but it took a while to debug it, so I'm going to add my answer to improve the knowledge base inside stack overflow!
Delete your provisioning profiles, do a 'Clean All', make sure that your provisioning setting are correct, redownload, and try to run again.
Open 'iOS Provisioning Portal' in Safari.
Tap 'Devices' in the sidebar.
Register your device's UDID
Tap 'Provisioning Profiles'
Edit your apps profile.
Select the device your have just added.
Download the .mobileprovision file.
Install it.
Build again.
I had the same problem in my app, after a few month this specific app worked fine.
The problem was that the Capabilities configured in my Xcode project (under Targets -> {ProjectName} -> Capabilities) were not the same as the Capabilities configured in the provisioning profile (you can check that in the Apple member centre under Identifier -> App Ids -> {your app ID}. In the member centre I saw that Game Center is enabled and so in my project I also enabled Game Center. Then the app was able to launch.
I don't know how it worked until now. That's still a mystery :)
For me check the "Automatically manage signing" option in Target solve the problem!
Upgrading to XCode 4 fixed the issue.
Deleting the xcuserdata folder solved my issue. More on that here: https://stackoverflow.com/a/9968884/300694
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)
I ran into this problem today and I was pulling my hair out trying to figure it out. Like many people here, it would work if I removed the iCloud options in my entitlement file. When I would go to debug the app with the iCloud options enabled then I would get the 0xe8008016 error. This was right after revoking and regenerating new certificates.
So what solved it for me was to turn on iCloud support for the automatically generated Xcode team profile. Log onto the online provisioning tool, go to App IDs, click on Xcode iOS Wildcard App ID, click on edit, enable iCloud by checking the checkbox, and finally clicking Done. Refresh your profiles in Xcode and then it will start to work.
This makes some sense - when you're debugging it defaults to the team profile and the team profile needs to have iCloud turned on.
Happened to me when I was trying to use an app store distribution provisioning profile for local test by mistake. When I used the proper development profile it worked just fine. Maybe this helps somebody too.
This worked for me...
I deleted the Entitlements file from the target.
Deleted the app off all my devices
Cleaned the build in Xcode
*optional delete the provisioning profile and re-add it
Hope it works for you guys too :)
This is what solved my problem: Deleting the path in the Code Signing Entitlements section of the Targets build settings.
My provisioning profile from Apple developer matched my Xcode capabilities but it still wouldn't build onto my device until I did the following:
Remove/Delete the entitlements file from your Xcode project.
Go back to the Xcode capabilities tab
Hit "Fix Issue" button to get Xcode to re-add the entitlements file.
Worked for me, hope it helps someone.
Happened to me on Xcode 8, it was partially caused by the new Provisioning Profile build setting, as in this Xcode version there are two entries for provisioning profile:
Provisioning Profile
Provisioning Profile (Deprecated)
My fault was that I updated only the first one, and the deprecated entry was still pointing to an invalid provisioning profile. Changing both to the same value solved the issue (clearing the deprecated entry should also have the same effect).
In my case, it looks like Xcode (secretly) reset the Scheme.
I found that the build configuration for Archive was set to Release instead of distribution one, and after I changed it to the correct one, it worked.
I think it is better to check the Schemes as well as the build settings.
I had old project and same problem and I solved .
1.Go to summary
2.Summary have keychain groups and delete keychanin
groups's object.
I hope it's will work for you .
Regards.
i'm using xcode 6 and encounter this issue for one particular iphone 4
finally , i go to device => provision profile =>
and then add the profile manually and problem is fixed .
For me in Xcode 5.1 I was getting The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. when trying to test the app on my device. Device Development Certificate has to expire Feb 2015.
Issue was resolved:
Selected Target->Capabilities, under GameCenter, here I was getting error on GameCenter entitlement as it was not added to project, although first version of application was released via same XCode 5.1 but there were no errors like this before.
Below, a button was given with title Fix Issue. When clicked it added the GameCenter entitlement and issue was resolved.
After wards the screen looks like:
For me, there was nothing to do with certificate. App now runs successfully on the device.
One more potential problem that will throw this error message: If you're using a perfectly valid provisioning profile for you main app, but have an expired or otherwise invalid provisioning profile for your Today widget extension. I imagine it'd be the same for an Apple watch extension as well.
Check all the profiles!
Check KeyChain Access!
In my case I was using the wrong distribution certificate associated with the provisioning profile.
The code I was working on had a different bundleid in the Info-plist than in the Product Bundle Identifier build setting.
I found this because I noticed this message in the device console in the devices view:
MIS: entitlement 'application-identifier' has value not permitted by provisioning profile 'iOS Team Provisioning Profile: com.xxx.yyy'
If you are trying to activate iCloud syncing, you will need to enable iCloud for the AppID that is used to create the development provisioning profile (which Xcode does automatically). You'll also need to enable this for distribution profiles as well.
The tricky part is that when you refresh profiles in Xcode, this does not trigger a renewal of the profiles; they are simply re-downloaded. So in your iOS Provisioning Portal under Provisioning/Development, you'll need to check the profile that is labeled (Managed by Xcode) and delete it (Remove Selected button). Do this for ALL profiles, development & distribution, that you need to regenerate.
Now, in Xcode in the Organizer, delete provisioning profiles that you are about to replace.
Now to get new ones. If you develop for more than one team and only want to refresh a particular one, select the appropriate Team in the left pane under TEAMS, otherwise select Provisioning Profiles under LIBRARY, then select Refresh.
Finally, remove any old provisioning profiles on your device that could conflict with the new ones since profiles are never deleted automatically; newer profiles are simply added to the list.

iPhone -- renew team provisioning profile

In the provisioning portal, the "renew" button for my team provisioning profile is grayed out. And said profile is expired.
How can I renew it?
EDIT: I found the "automatic device provisioning" checkbox and "refresh" button in the organizer in Xcode. But when I select the team profile, check the checkbox, and push the refresh button, I get this message:
An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Support (http://developer.apple.com/support).
I suppose I can go to support, but it would still be better to figure out what the problem is without involving them.
I had the same "unexpected error" issue with the Team Provisioning Profile when it expired. I fixed it by deleting it in the Xcode Organizer AND in the ADC Provisioning Portal, then hitting renew in Organizer.
Posting this again here..
OK, I had the same problem with the disabled 'Renew' button against my Team Provisioning Profile.
This worked for me.
1) Deleted the expired Team Provisioning Profile from the Xcode Organizer.
2) Deleted the same thing from the developer provisioning portal.
3) Again from Xcode organizer check marked the auto provision and clicked 'Refresh'. it asked for the credentials and in a few seconds added the renewed Team Provisioning Profile.
4) It also added the new profile in the developer provisioning portal.
Refresh and removing the iOS devices did not help on my installation.
But I found that the error messages was misleading. I am also member of the Mac developer program and after choosing "My Mac" under DEVICES and pressing the (+) Add to Portal button, the error message "Your team has no devices for which to generate a provisioning profile." did no longer appear.
So it looks like the error message covers the Mac and not iOS devices even that the URL at the end of the error message links to the iOS development center.
I had the issue that Xcode didn't refresh or renew it's managed Team Provisioning Profile and tried a very long time. I always hit refresh in the Library->Provisioning Profiles - section. Then I tried out the Teams section and after hitting the refrsh button there my Team Provisioning Profile which was managed by Xcode was renewed successfully. Hope this helps some of you.
One more thing: I used the same Apple-ID in three teams. So maybe Xcode failed to separate them while refreshing.
Do these things if you want to really solve the problem:
(1) Are you using the certificate for which you made provisional profile from your mac? Or you are using the certificate from other mac machine. If that is the thing then please get .p12 file from there and install in your keychain.
(2) If your certificate in the keychain is the same for which you made the provisional profile then it's fine. Otherwise you have to create new provisional profile for the certificate.
(3) Please make sure that you have set the app id in the target > properties > identifier. If no then please set and choose the provisional profile from the target > build > code signing identity.
(4) Then clean and build your project.
If you find any problem then please let me know. I would like to solve this problem.
I fixed it by signing into my Apple ID in XCode->Preferences->Accounts tab
Is the certificate it is based on expired? Did you delete the device it was for?
Try deleting the profile and click Refresh so Xcode re-adds it. Just a guess. I don't know why this would work, but it's worth a try.
Are you pressing the renew button from within Organizer in the latest Xcode version, 3.2.5 beta 3?
Here's the answer to compiling question, however, if anyone else has the answer to the team provisioning profile please post.
You can still compile apps for your device/simulator by creating a developer profile and downloading it to your device.
The key to getting it to work is to make sure the profile is selected in both the Edit Project and Edit Target Settings from the Project Menu. The Target Setting is more specific and usually screws people up. Making sure they are both in sync will help you get things up and running.
From these two menus, check the Build tab and make sure the developer profile is displayed. The default is iPhone Developer and should point to your downloaded profile.
Is there a problem using a different mobileprovision file? I believe you are getting the error on using a different provision file because your Target might be using the older one.
Try this
Get the new mobileprovision file and
in Project's Build properties, set
the mobileprovision to this one
Select the active target and in the
target's Build properties, ensure
that the same mobileprovision is
being used
Compile the app.
See if that helps.
As far as the Team Provisioning profile goes:
Does your console say anything? Are you using Xcode 3.2.5? I'd file a radar at http://bugreport.apple.com. Do you see the Team Provisioning file in the iOS Provisioning Portal? Does it have a green light?
You might try revoking it and letting Xcode create a new one.
As far as getting your app to work
You can always create an app-specific development profile. Choose your certificate and the app you are working on. Also make sure to select your device in the checkbox list.
Then download the profile (once it is ready) and double click on it to import it into Xcode.
If you look at the Xcode organizer, you should see your development profile in the list.
If it's red, that means your certificate has expired
If it's yellow, that means you don't have the private key present to sign using the selected certificate
In the project's Get Info window, under code signing, choose iPhone Developer for both pickers. Take a look at see which one is automatically selected (sometimes you have to manually choose the right one).
Then do a Clean & Build and you should be good to go.
I made the mistake of looking in Wrong place in Organizer.
On the left is LIBRARY then below that DEVICES
I had clicked on my Iphone under DEVICES > Prov profile.
No refresh button there.
Correct place is
On the left in ORGANIZER is Library > Provisioning Profiles
then Team provision Profile is here
Click on it and hit refresh if expired
As always.... "grep -ir profile ." and the cmd line are always your best friend when you want to fix an Apple frustrating, inconvenience and pain in the ass.... Spent almost an hour poking around xcode trying to find that option to enter the new provisioning profile number, and none to be found... Only when I grep'd for it, was I able to fix, yet another apple pain in the ass.... I can't tell you how many times I've spend hours going through xcode, stuck, because it won't compile because of some stupid invalid setting, profile or argument, only to fix it when I fell back on grep & ssed...
This worked for me:
start xcode.
Window->Organizer from menu
Choose "Provisioning Profiles" from DEVELOPMENT menu.
click refresh button
exit organizer
return to xcode main window.
Build->Clean from menu
build and run.
I fixed this by going to the portal and clicking "modify" on all expired profiles. Then click "select all" for devices and submit.