I'm trying to validate an archive, before submitting it to the app store, but I keep getting the following error :
"MY NAME" is a valid identity. However, the associated package
identity "MY NAME" has expired.
There is an option to "Refresh Code Signing Identity", but nothing seems to happen.
What could be going wrong? Any ideas?
Hint : It's not my first time uploading an archive to the app store; I've already done that like 100 times. The thing is I'm using a different development machine and think that probably this is the one to blame. But I'm still confused...
I had the same issue. Deleting the expired developer certificates via "Keychain Access" did the trick for me.
From Keychain Access, View, Show Expired Certificates and delete all of them.
MAS: Code Signing Identity Private Key
Francesco Germinara
I had this exact error message, and it turns out that I needed to download and install both the Mac App certificate as well as the Mac Installer certificate, but I had only downloaded the Mac App one.
Related
I have some apps already published in iTunes, I've compiled and published them from my Mac many times. Recently I was forced to reset my passwords, and then I tried to compile and XCode told me that:
a) I wasn't logged in
b) My certificate wasn't found in the keychain (Revoke)
So, ok, I logged in again and created another certificate. I read in another post that: "If you change your password for your computer after you have already created a cert, you will have to go through the process all over again and create new certs."
But now when I'm going to compile, XCode tells me that my private key can't be found in my keychain. And I can't create a new one because my app is already published. Where is it?
All the info I could find on the web tells me to contact the owner of the Mac which originally created the private key to import it to mine. But it's my Mac! Where is it? Where is the private key? Gone?
Try going into Keychain Access, type in "iPhone Developer" or "iPhone Distribution" into the search field in the top right and you'll get a list of valid and expired certificates.
As you can see from the below screenshot, I have a pile of expired ones, and one valid one. Clicking on that valid cert reveals the private key underneath it.
i just signed up for this place, i have made app everything is working fine with app all the certificates and files are updated but when i try to upload to app store from xcode i keep getting this error. if anybody could help me to fix it it will be great thank you
iTunes Store operation failed.You must supply a CFBundleIdentifier for this request.
Your info.plist application is wrong.
open your info.plist,"Bundle OS Type code" is null.I met the same problem,and add "APPL" to "Bundle OS Type code",that's OK.
Your info.plist configuration is wrong.
open your info.plist,"Bundle OS Type code" is null.I met the same problem,and add "APPL" to "Bundle OS Type code",that's OK. See image here
Login in Apple Developer, go to Certificates*Profiles, delete all development and distribute signing certificates and provisioning profiles. Then in Xcode8 you select "Automatically manage signing", recreate signing certificates and provisioning profiles,archive and upload to appstore again.
This one nearly put me mad. How I fixed it was creating a test project and doing an archive on it, and validate, which passed. I then copies all of the build setting from the test project to my project and thankfully everything worked. I know its along way off doing it, but it works.
this is what i have done and it did work for me
i did have to explicitly add the bundle identifier in the .plist file like this
<key>CFBundleIdentifier</key>
<string>com.AppIdentifier</string>
instead of
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
the reason might be that i do have multiple target in the project and i was uploading the app from the application loader
please note that in both cases i was able to archive successfully
env.
Xcode 10.1
High Sierra 10.13.6
I'm using Xcode 6.1, OS X Yosemite preview 8, and I'm getting the following error on code signing my app:
Command /usr/bin/codesign failed with exit code 1
Reading on Google, it seems to be linked to expired certificates/provisioning profiles. I deleted all of my certificates & profiles, created a new development certificate & profile, installed both, restarted my Mac, and I’m still getting the same error.
Can anyone shed some light on how to resolve this problem?
How about this: Try Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart XCode. Sounds like voodoo but it works for me and my team! (Posting it as answer, because it DOES work, at least sometimes and for some people. Possibly related to the weather ;) )
as of Xcode 6.3.2, here's what I did.
from main project view, click on build settings and in the search bar type in certificate, a code signing tab should pop up, I chose "dont sign code". and it worked
So I've managed to fix the issue for my particular case - in the build settings, instead of automatically detecting the certificate & provisioning profile to use, I manually set them - and it works.
In my case I was getting this error while trying to build a project I downloaded from Github for my own personal use. I just went to the build settings and told it not to sign the code.
Another gotcha I noticed is that codesign will fail if run from an ordinary ssh login session. It has to be run on a MacOSX desktop GUI shell window. This catches me every time, so I've added a line to the build script to print a message about running the script on the MacOSX GUI if codesign fails.
Delete previous provisional profile and add new provisional profile.restart the machine if still its giving an error like above. when your machine shut off then automatically your device asking for permission then select Confirm and run your code....its working.
There appears to be a bug in XCode (I'm using 7.1.1) with returning to "Signing: None" after having attempted to sign with an expired identity, resulting in this codesign error even after you've apparently removed the bad signing identity.
The project.pbxproj file retains TargetAttributes for the expired identity, and Debug and Release settings both continue to show the following instead of the original empty values:
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
This persists after cmd+alt+shift+K and closing XCode. I fixed it with a git reset (if I hadn't committed before attempting to sign, I'm not sure how I would have found this).
I had to delete all my developer certificates from Keychain Access first, then use the Preferences -> Accounts -> View Details -> Download All approach to successfully re-sign my code.
I have an application that stores username and password in the keychain. Everything was working fine when working on Xcode 3, I recently moved to Xcode 4 and now when I run the application, I get a prompt:
Application wants to use your confidential information stored in keychain" in your keychain.
After hitting always allow I see the application added to access control list of the keychain item, but I get every time I run the app.
Also after hitting Always allow again, I see that the access control has two instances of the same app. Seems like OS thinks this is a new application.
Any ideas appreciated.
I believe the problem is that your signature's designated requirement causes it to not accept itself as "the same app" as itself (for Keychain purposes).
One common cause for this—and I think it's yours—is using a Developer ID Application cert, with no designated requirement, and without the intermediate cert installed.
A standard Developer ID requirement looks like this:
designated => anchor apple generic and
identifier \"com.example.appName\" and
((cert leaf[field.1.2.840.113635.100.6.1.9] exists) or
(certificate 1[field.1.2.840.113635.100.6.2.6] exists and
certificate leaf[field.1.2.840.113635.100.6.1.13] exists and
certificate leaf[subject.OU] = \"1AZBYCXDW9V\" ))
If you want to construct this yourself, you have to replace the identifier with your bundle identifier and the subject.OU with the value from your cert. (If you double-click it in Keychain Access, it should be listed as the Organizational Unit.) Then you can add to "Other Code Signing Flags":
--requirements "=designated ..." (the whole mess from above)
However, a much better way to do this is to use Xcode 4.3.2 or later. If it recognizes that you're using a Developer ID Application cert, and can see the intermediate cert in the keychain, it will generate this by default.
Also, if you use the Archive Organizer in Xcode to "Export Developer ID-signed Application", instead of just using the build from your target directory, it will make sure to sign your app and any other enclosed signables, and it will test that everything is setup properly. (The failures are pretty cryptic—e.g., your "Choose a Developer ID to sign with" step may just have no choices, with a message in the syslog that has no useful information—but at least the fact that it failed or succeeded narrows down where your problem is.)
Either way, you need to download and install (on your build machine) the intermediate cert, called "Developer ID Certification Authority", from the "Developer ID Intermediate Certificate" link at the Developer Certificate Utility site.
One last thing: Even if this solves your problem running on your build machine, you really want to test on the oldest OS version you support. For example, the requirements compiled by Lion's codesign sometimes can't be parsed on Leopard, or sometimes even on Snow Leopard. If that happens… see Gatekeeper vs. Leopard: an ongoing tale.
Our company is setting up another development station for the same app that will be sent away. I installed Xcode and tested the app in the simulator. I downloaded the Certificate and Provision that worked fine on my other computer. I selected the correct code signing identity and when I build it for a release to my iPad I get an error:
Code Sign error: The identity 'iPhone Developer: Person's Name (XXXXXXXX)' doesn't match any valid certificate/private key pair in the default keychain
In organizer, I click on Provision Profiles and the provision profile I downloaded. Underneath I get the warning:
A valid signing identity matching this profile could not be found in your keychain
I've looked up many, many other people that had this problem, but all seem to resolve it by deleting the cert and provision, which I never want to do! i.e., what if I want to use the same provision and cert on two different machines, or many?
I also went through deleting, recreating, deleting, rinse-repeat - but the answer was simple.
I had the same problem and solved it very simply in XCode Organizer - I'm using Version 4. All I did was go to the top Library section and select Provisioning Profiles, and import the downloaded profiles that I had received in my Safari downloads named "name.mobileprovision".
I think you just have to export the valid certs from the working computer, explained in this doc.
http://developer.apple.com/library/ios/#qa/qa2008/qa1618.html