Another 'no identities are available for signing' issue - iphone

So i'm attempting to submit my app to the app store and getting the 'no identities are available for signing' error.
Ive gone through and remade my distribution certificate about 5 times so far in the provisioning portal, re-downloaded it (through xcode) each time and to no avail it still gives me the error.
Ive adjusted the code signing in the build settings to be set to the 'iPhone Distribution: (my certificate name)' as well as making sure my bundle identifiers match.
Ive restarted XCode multiple times and nothing seems to be working.
ideas?

Have you tried cleaning your project? This oftentimes resolves such issues with my own projects.
Product ==> Clean

Related

Xcode fails with "Code Signing" Error

Alternate Titles
(to aid search)
Xcode 'CodeSign error: code signing is required'
Xcode: iPhone app codesign error
/usr/bin/codesign failed with exit code 1
Jenkins fails with Code Sign error
Command-line build fails with "provisioning profiles not found"
Archiving Xcode project fails with provisioning error
Missing signing certificates in Xcode
Symptoms
The issue manifests it's self in one of several ways:
Running your app on a device results in an error referencing "code signing" or "expired signing certificates"
Building from the command line (or using a continuos integration system, such as Jenkins) fails with a error similar to this:
Check dependencies
Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates
Archiving an app fails with "code signing" or "expired signing certificates" where a run or build work correctly.
Often the project may have several configurations and sometimes only a subset will fail. Deleting and regenerating provisioning profiles has no effect.
CODE_SIGN_IDENTITY verification script.
Often in set ups that use version control the project.pbxproj can be merged in such a way that two CODE_SIGN_IDENTITY lines can be inserted. This seems to cause Xcode problems under certain situations (like command-line builds or archiving).
A tell-tail sign is lines similar to this in the project.pbxproj file (right-click on the project and select "Show Package Contents…")
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Distribution";
Deleting one of these lines will let you select the correct value in Build Settings and the project should once again build correctly.
I have created simple script to help diagnose this issue it can be found here: https://github.com/rjstelling/Xcode-Project-Validate
I got this code sign error with an Open Source Github project which I only wanted on my own device (not in store or anything) and I don't have a paid membership account.
In that case it's meanwhile (since XCode 7) possible to configure and allow your app as unsigned but trusted.
It's all explained here: https://stackoverflow.com/a/4952845/828184
I had a similar problem which I could solve after a lot of wasted hours. So writing my solution here in case it helps someone.
My iOS app, which I have been developing and deploying/updating regularly for past 5 years, recently ran into a similar issue where final "Distribute App" via XCode Organizer started showing an error "Code Signing for MyAppName.app failed - see distribution logs for more information". The distribution logs have no information whatsoever.
After a lot of trial-and-error, I found that the certificate used for code signing had somehow gone corrupt. I deleted the certificate and it fixed the problem. Hope this helps someone.

XCode 4.3 codesign failed

H e l l o Everyone, after installing the last Xcode 4.3.1 I stuck with submitting apps. I can't archive apps for submitting. It says:
warning: Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
Executable=/Users/YYYYYY/Library/Developer/Xcode/DerivedData/XXXX002-ekjbelaglwpkredizicvazolomgj/Build/Intermediates/ArchiveIntermediates/ZZZZ/InstallationBuildProductsLocation/Applications/ZZZZ.app/ZZZZ
AssertMacros: message, file: /SourceCache/codesign_wrapper_Sim/Security-1245/codesign_wrapper/codesign_wrapper.c, line: 495
AssertMacros: profile, file: /SourceCache/codesign_wrapper_Sim/Security-1245/codesign_wrapper/codesign_wrapper.c, line: 904
codesign_wrapper-0.7.10: Failed to load provision profile from: /Users/YYYYYY/Library/Developer/Xcode/DerivedData/XXXX002-ekjbelaglwpkredizicvazolomgj/Build/Intermediates/ArchiveIntermediates/ZZZZ/InstallationBuildProductsLocation/Applications/ZZZZ.app/embedded.mobileprov
- (null)
I've tried to put in provisioning profiles (renew them), but it does not help.
There is no such a warring during normal build, only during archiving. In organizer when I press renew it gets only developers provisioning profiles and not renewing ones for distribution. So I put the distribution profile manually.
I've tried also to fix the project - Code sign identity - putting there iPhone distributing provisioning profile, remove build and clean targets, remove DerivedData (just in case) like people advised and cleaning all targets and checked twice that certificate is not expired.
Fortunately I kept the previous version of XCode 4.2, and it works fine archiving the same project. But I would love to hear any suggestions how to make XCode 4.3 working. Thank you in advance.
I had exactly this problem last night and was tearing my hair out!
However, the clue is that the last line "Failed to load provision profile" has characters missing from the end ('mobileprov' instead of 'mobileprovision'). Mine did too. I think there's a character limit per line and if your directory or application name is too long it will fail to work properly.
I re-created the project with a shorter name and everything worked fine (after re-doing the provisioning, etc.).
Since that was my first app (and it was painful to submit!) this is a stab in the dark as to what the real cause is - so perhaps the more advanced users out there could tell me if I'm right or not? Or was the re-creation of the project more likely to have fixed the issue?
Richard

Provisioning, certificate, error from debugger

EDIT: After trying many, many things over and over again I've decided to upgrade to xCode 4 and problems stopped. I don't know what was wrong so unfortunately this is my advice to the rest of you who are lost with the problem I had.
PS thank you all for your suggestions :)
Hi everyone,
I don't know why, but my app stopped compiling on my device after trying to enable push notifications. In debug mode with developer certificate it was running ok, but I was getting push notification related error in the console. After reading about this problem I realized I'll have to sign the code with Distribution certificate in order to really test the push notification. After "playing" with these things my app could not be deployed on the testing device anymore…
I am getting 2 errors over and over again:
1. The executable was signed with invalid entitlements
and when I solve this problem by changing the "code signing identity" to another developer certificate (admin) I get another one:
2. A valid provisioning profile for this executable was not found.
I tried all of the following:
- I logged with my team admin's pass and deleted /revoked certificates and profiles, recreated them and installed them on my computer. In keychain everything seems ok (certificates with keys) and in xCode Organiser (new profiles) also.
I cleaned targets several times
created Entitlements.plist with custom value "get-task-allow" unchecked
In Entitlements.plist I put my bundle identifier
I removed profiles from iphone device and tried again. It installs right provisioning profile
I restarted computer/xcode, iPhone several times
Then, when I saw that I'm going crazy I've decided to try to start another application just to see if this one can be run.
Guess what… It can't. I get the same two errors as above.
I'll explain how I recreated things in developer portal step by step so that you can see If I'm missing something. Just have in mind that we are using 2 developer tools accounts (team admin (A), team member (B)). I'm saying this because I might have done something wrong while recreating certificates and profiles…
REMOVING OLD SETTINGS
1 deleted certificates (dev and distribution) and private keys from keychain.
2 removed all provisioning profiles from xCode Organiser.
3 In developer portal (as Admin) I revoked its Development certificate and then removed Distribution certificate
4 In devices I removed my iPhone device
5 I removed all Development provisioning profiles. The Distribution ones cannot be removed???
6 Then I logged into Team Member's account and revoked development Certificate
CREATING NEW CERTIFICATE; PROFILE...
1 In keychain assistant I created new CSR and uploaded it, admin approved it and I downloaded it along with WWDR intermediate certificate. Drag and dropped them into keychain - login / category - certificates
2 I added my device name/identifier
3 In PROVISIONING/DEVELOPMENT I created new provisioning profile. I added my developer, all devices, and app ID.
4 Then from my team member account I downloaded it, double clicked it and that was it.
5 In xCode Project info I set code sign to developer certificate, and I ran and built with Device / Debug. I get build succeeded and error: The executable was signed with invalid entitlements
TAPPING IN THE DARK:
//I create enitlements.plist and run and I get: Error from debugger: The program being debugged is not being run.
//Then I add get-task-allow = false and I get the: The executable was signed with invalid entitlements.
//If I change it to true then I get: Error from debugger
//Then I add my app Id to Entitlements as a pure string. Nothing changes here :( - either
Thank you very, very much for even reading my post.
Hope I'll solve this before going nuts…
Best regards,
Luka
For that you have import private key(.p12) of mac of your team leader then it will work.I face the same problem it works then only if you will have private of that mac from where the certificate made.Hope so that it will help.
I just spent a few hours with this exact error, the steps i took to resolve it were:
check that app ID has push enabled
create a new provisioning profile
delete all other profiles in xcode and on the device and use new profile
(building and installing on device without error)
create entitlements.plist and add in get-task-allow, change type to boolean, set to true
(now getting entitlement error)
So after much googling i found a blog post about how images can affect this so i checked and noticed we were in the middle of changing the app icon and currently didn't have one set. So I threw in a older app icon and it just started building like magic and giving me the device token.

Another Application failed codesign verification error

I know this has been asked before but tried everything and no luck. Trying to upload my binaries using Application Loader and getting the above error.
Some interesting things for my case:
I accidentally have a space in my App name. Would this cause the code signing to fail?
Looked in the build log and the last entry is * Warning: Defaulting to the standard codesign tool. Could this be the issue causing the problem? If so how do I solve it.
Behind a corporate firewall. I have access to the net but certain ports may be closed. Could this affect it?
Tried everything except revoking all the certificates mainly because I've just created them a few hours ago.
EDIT: OK, I've recreated the entire project, I've revoked all my certificates and recreated them and installed them, I've exported the last version from subversion to make sure subversion is not affecting it, used command line tool to compress it, made the target codesign the correct profile, made the project codesign both default and the distribution profile, tried a different net connection to make sure its not the firewall.
As you can see I've tried everything I can find and the stupid thing still wont work.
Any help?
Cheers
K, This is incredibly annoying. After doing everything as I said in the question and doing some things twice decided to try the Application Loader on someone else's computer. Worked first time, didn't skip a beat.
Strange thing is I have the current Xcode (which I assume is where Application Loader comes from) and the other computer is running an old one. Perhaps the current one is broken?
I had the same issue using XCode4. Turns out I needed to Edit the Scheme and specify that the Build Configuration for Archive was to the be the one for the one associated with the Distribution Provisioning Profile - in my case "App Store".
If you're having the same problem, that may be something to check.
At the project level you want to set your code signing identity, BUT LEAVE THE PROVISIONING PROFILE TO DEFAULT.
Then at the target level you have to set both the code signing identity and the provisioning profile.
If you fail to do that the package will be signed but not interpreted correctly by itunes connect.
I too had this problem, until I realized there's a different way to upload the apps now.
My 'release' Apps build as Archives
If you open the organizer and select 'Archives' at the top, there are 'Validate', 'Share', and 'Submit' buttons in the header info for your app.
Clicking on 'Validate' added my code signing information to the app (after logging in with the appropriate developer login)
Clicking on 'Submit' ran me through the same questions the Application Loader used to ask and uploaded the app without problems. (again after signing in with the appropriate developer information)
Apparently when I updated to xcode 4, it just didn't remove the old application loader.
Rudiger has worked around his problem by updating to the latest version of Xcode, but for others experiencing the error "Application failed codesign verification", see Apple's published list of potential causes at the following URL "How do I resolve the error: Application failed codesign verification?"

The executable was signed with invalid entitlements (iPhone build)

Ok I'm no rookie to this stuff. I know what I'm doing, so please dont take me through the basics. I updated Xcode to the newest version the other day, and now every new project and saved projects from the past that HAVE succesfully been built using its own distribution certificate are no longer succeeding with the following 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.
(0xE8008016).
This is happening to ALL my apps! I have six of them, and all of them have never had problems with their certificates, but now I'm getting this error! I'm not even making adhoc builds, so Im not using entitlements, nor is it specified in the code signing entitlements box. That box is blank. Ive tried everything, this is definitely an Xcode issue with updating.
Please help this is extremely frustrating.
This is just a shot in the dark, but maybe try deleting all of your provisioning profiles from Xcode and all of your devices, then download them again from the provisioning portal and reinstall them on everything? I ended up doing that anyway when I upgraded.
In my case I had "code signing" line in my targets and project build settings. Despite it was empty it was still giving me this error, until I deleted it completely in targets and partially in project. So that is what I did:
In Xcode 4.2 I went to my PROJECT\Build Settings found that line "code signing", clicked on it and in Entitlements deleted all lines (they were empty but still there!), so Entitlements disappeared.
I put in "code signing identity":don't code sign
"debug":don't code sign
"Any iOS SDK": choose your provisions here, I used automatic, worked fine
"release":don't code sign
"Any iOS SDK": same as above
Then I went to TARGETS\Build Settings, found the line "code signing" and deleted everything under it so it disappeared from targets.
Now I could build onto the device, not only in simulator.
Hope it helps somebody.
B