Having a problem with codesign and wonder if anyone has any ideas. I'm using the command line 'codesign' command from a Terminal window (under OSX 10.10.3 Yosemite). I dont use XCode as the app in question is created using command line gcc with make etc (its a Qt based app).
Running codesign gives the error (obviously I have changed the actual name and code used in this posting):
Developer ID Application: Foo Bar Ltd (C8C8B8D8X8): no identity found
The command line I use to run codesign is:
codesign -f -s "Developer ID Application: Foo Bar Ltd (C8C8B8D8X8)" -i uk.co.mydomain.myapp -v binaryfile
But I have the certificate installed so dont understand this. If from the same terminal window I do:
certtool y | grep Developer
I get:
Common Name : Developer ID Certification Authority
Common Name : Developer ID Installer: Foo Bar Ltd (C8C8B8D8X8)
Common Name : Developer ID Certification Authority
Common Name : Developer ID Application: Foo Bar Ltd (C8C8B8D8X8)
.. which all looks OK. If anyone knows what might be wrong it would be a great help.
The funny thing is, the identical commands used to work. Whats happened since I last did this successfully is that I updated the Mac to Yosemite 10.10.3 and Xcode 6.3.1. First time I tried using codesign after that got the 'no identity found' errors. At this point using certtool showed that my
certificates were no longer there. Whether they'd expired or the process or upgrading to Yosemite or Xcode had dropped them I dont know. So, I logged in to my developer.apple.com account and downloaded both the Application and Installer certificates [specifically, I downloaded them using Safari, double-clicked each download which opened them into Keychain Access and installed them into the login keychain]. After doing this, "certtool y" gives the results shown above from the same terminal window from which the codesign command fails. I also installed the 'Apple Worldwide Developer Relations Certification Authority' certificate into the System keychain.
If I open Keychain Access now this is what I have:
Under the 'login' keychain in the 'Certificates' category I have listed: my Developer ID Application cert, Developer ID Installer cert, and the Apple Worldwide Developer Relations Certification Authority
Under the 'System' keychain in the 'Certificates' category I have listed: Apple Worldwide Developer Relations Certification Authority, com.apple.kerberos.kdc, com.apple.systemdefault, and my Developer ID Application cert (again, seems to be in both the login and System keychains).
If anyone can offer any help I'd much appreciate it. Thanks!
I solved this myself, thanks to the hint from The DarkKnight above. Problem was the lack of the private key in my keychain.
This arose because, when I discovered the certificates were missing entirely, the immediate advice given both on the apple developer site and elsewhere on stackoverflow is to download the Developer ID Application and Developer ID Installer certs from the apple developer site, which is easy to do. So I did that, and added the intermediate 'Apple Worldwide Developer Relations Certification Authority' cert too. But doing that does not set up private keys, and nowhere do the codesign errors indicate that that is the problem. I then discovered that going through the process of submitting a certificate signing request (CSR) to the apple dev site does set up the private key.
Solution: dont simply use the 'download developer ID cert' option from the apple dev site, instead submit a CSR and do this both for the Developer ID Application and Developer ID Installer certs.
Related
I've just downloaded a fresh copy of Eclipse Version: 2022-09 (4.25.0) Build id: 20220908-1902 and fired up the Marketplace client to install Spring Tools 4 (4.16.0.RELEASE).
Edit: I should add that I used the same workspace as the previous version and chose to convert it for the latest version when prompted
I clicked "Install" and kept only the required features and then clicked "Confirm" and accepted the license agreements, then clicked "Finish".
While waiting for it to download and install, a "Trust" dialog popped up saying the two items have expired. One is "Pivotal R&D" and the other is "Pivotal ", they expired back in 2020 and 2018, respectively.
A Google search did not turn up similar issues reported by anyone. I'm not behind any firewall, proxy, or VPN. I would like to know how to proceed with the install without having to trust these expired certificates.
Dialog showing expired certificates
I filed an issue for this here: https://github.com/spring-projects/sts4/issues/852 - we basically need to update the signing information for those pre-built third-party bundles that we include in the Spring Tools 4 distribution builds.
In the meantime, unfortunately you need to trust the expired certificate to get the bundles installed.
Everything started when I tried to create and validate my archive for the new app version.
My developer certificate expired, I revoked it (I didn't revoke distribution certificate it is still valid) and now it is up to date. I deleted my old associated provisioning profiled from Xcode and Xcode is configured to generate them automatically. After The provisioning profiles were not in my account. I was able to compile fine without errors using simulator, but I can not run app on my iPad. I deleted old app version (I could not find in iPad Settings->General any Profiles to delete since my version is iOS8.4 and it deletes it automatically) I don't know if I need to delete anything else on iPad?
Now when I try to run from Xcode app on iPad, I get this error:
Command /usr/bin/codesign failed with exit code 1
(see details below)
NOTE1: I don't get this error when I run it in the simulator, only when I chose to run on registered iPad
NOTE2: I was able to run app on this same iPad before I revoked the certificate.
NOTE3: I was able to create archive and submit the app before, problems started when certificates expired.
All troubles started after revoking the certificate.
I am running Xcode version 6.4
Mac has OS X Yosemite Version 10.10.5
Here is what I did so far:
After revoking certificates,I tried to delete provisioning profiles and restart Xcode, Mac and iPad and that didn't help.
I deleted old certificates from keychain, right now I have just the new up to date certificate in my keychain.
When I tried to run Xcode it asked me to fix non-existing provisioning profiles and it worked for simulator, but not for iPad.
I also looked in Xcode general settings for the build and tried various things, but that didn't help...
This didn't help too:
Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart Xcode
I tried to read developer guides for distribution, but troubleshooting suggestions how to run on development device didn't help, also I didn't find much about this codsign error.
I also downloaded new certificate WWDR from Apple, that didn't help.
I tried most of the things what people suggested related to this error posted, but didn't help...
One additional info:
My problem is also that I am trying to submit second version of the existing app, so I don't know what I can delete in order to be able to submit the updated version of my app again. If it was new project I would create new project from scratch and start from zero, but this happened just when I was ready to submit new archive...
Do you have any suggestion how to fix this issue, which steps to follow?
I would appreciate your pointers where to read or what to do.
If you need additional info from me, please let me know.
Thanking you in advance, -Tatjana
CodeSign /Users/t/Library/Developer/Xcode/DerivedData/K-eskcdowdkybtiygveputefcuziqr/Build/Products/Debug-iphoneos/K.app
cd /Users/t/Desktop/myProjects/K
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: T... (G....)"
Provisioning Profile: "iOS Team Provisioning Profile: com.k.K"
(5....)
/usr/bin/codesign --force --sign D.... --entitlements /Users/t/Library/Developer/Xcode/DerivedData/K-e.../Build/Intermediates/K.build/Debug-iphoneos/K.build/K.app.xcent /Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app
CSSM_SignData returned: 8001094A
/Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app: errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1
I go to organizer. I press
Devices
Then I go to editor and Refresh from developer portal.
I got this error:
An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Program Support.
So I deleted all certificate or anything xcode related from my keychain. I deleted all certificate from apple developer center. Same problem.
Then I do it again.
First xcode says that there is no certificate. Want to make one. Sure.
Certificate is indeed created.
Then I got that message An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Program Support.
It seems that I need to have some code signing identity. But how to make that and where is it? It's not available in itunes connect or apple developer program support.
I thought my certificate is my identity.
There is a similar question already. It says to delete both in Apple developer center and in xcode. I did that. It doesn't work.
Sometimes I got a message whether I want to sign with Looks like some key is wrong. But what?
When I tried to run a program I got:
(null): Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
When I go to organizer and submit my application to create that distribution certificate I got No identities available for signing.
So I download identities. Then I got an error occurred while attempting to download. Please try again.
There is also an option saying
Import developer profile. I guess I have to recreate this so called developer profile. What is it? And how?
According to this, after I create my first certificate I will be asked if I want to create a developer profile.
That never happens. I just got "An unexpected error occured" again.
Using xcode 5, I solved this by refreshing my provisioning profiles in preferences - accounts.
Hope this works for you.
I have developed a mac app, and am trying to upload it to the mac app store, but am running into difficulties. Every time i try and submit or validate in Organiser, it comes up with the following error:
"The product archive package's signature is invalid. Ensure that it is signed with your "3rd Party Mac Developer Installer" certificate."
I have signed it with my installer certificate, and the application certificate, have downloaded the Worldwide Developer Relations certificate, but it still refuses to work. I have tried many of the solutions on the internet, but with no joy.
I can suggest to try signing your app from command line, using the /Developer/usr/bin/codesign tool:
codesign -s "name of your signing cert" /path/to/MyApp.app
codesign has a number of options and a man page. It may help spotting the issue you are experiencing.
I need to code sign my Mac App. I obtained the certificates from the Apple's developer portal and would like to install it. The certificates are listed in Keychain Access. How to I go about doing this so that it is listed in Xcode 4?
Thanks.
I ran into a similar issue. In my case, it was caused by my installing the certificates in the incorrect ("System") keychain. They should be in the "login" keychain. The Keychain Access tool will let you drag and drop them into the login group.
This is what it should look like:
Once I did this, the signing option appeared in XCode:
I had reinstalled OSX without backing up my certificates. Therefore, when I re-downloaded it from Apple it will not work. I had to recreate the certificates from the Developer Certificate Utility for it to work again.