Hi everyone,
I’m trying to get my iOS app running on a physical iPhone for real-device testing, but I’m blocked by a persistent code-signing issue in Xcode.
The project compiles successfully, but when I select my physical iPhone as the destination, the build fails during the signing stage:
errSecInternalComponent
Command CodeSign failed with a nonzero exit code
The app therefore never gets installed on the device.
What I’ve checked:
- Xcode recognises my Apple Development certificate.
security find-identity -v -p codesigningreports the identity as valid.- The certificate is present in my login keychain.
- Keychain Access shows the certificate with its private key underneath it.
- My login keychain is unlocked.
- The keychain search list contains my login keychain and the System keychain.
- I checked both keychains for the corresponding private key.
- There are no custom trust settings.
The particularly strange part is that signing fails outside Xcode too. I tested signing /usr/bin/true directly using the same Apple Development identity, and that also fails with:
errSecInternalComponent
I also attempted to repair the private key’s signing access/partition list, but received:
The specified item is no longer valid. It may have been deleted from the keychain.
Certificate situation
Xcode → Manage Certificates currently shows two Apple Development certificates:
One current certificate
One older certificate marked “Not in Keychain”
When I try to create a new Apple Development certificate, Xcode says:
You already have a current Development certificate or a pending certificate request.
This is the only Mac I have used with this Apple Developer account, so there isn’t another Mac from which I can recover or export the original private key.
What should I do?
I’m trying to understand the safest next step without making the certificate/keychain situation worse.
Should I:
- Revoke the older certificate and create a new development certificate/private-key pair?
- Try to repair the existing signing identity/private key?
- Take another Apple-supported approach?
The immediate goal is to get the app onto a physical iPhone so I can begin real-device testing, followed by QA/beta testing and App Store launch.
Any advice on what is actually causing errSecInternalComponent in this situation, and the safest way to resolve it, would be greatly appreciated.
I can provide additional Terminal output, screenshots, or Xcode logs if helpful.
Thanks!