iOS Question [SOLVED] Missing private key for signing certificate. Failed to locate the private key matching certificate

Matt S.

Member
Licensed User
Hi Everybody!
I registered in the Apple Developer Program and created the Provision Profile with the Certification of our company. Then I Created the Private Sign Key in B4i. But I got this message:
error: Missing private key for signing certificate. Failed to locate the private key matching certificate ...
Can anyone help me?

Thanks for your attention
 

Matt S.

Member
Licensed User
Are you using B4i 8.9?

Java version?
It is 8.9 (64 bit) Registered Version.

I don't know about Java version.

Here is the "About" :
 

Attachments

  • Screenshot 2025-08-06 014759.png
    Screenshot 2025-08-06 014759.png
    39.5 KB · Views: 23
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Make sure to use Java 19. Download link available here: https://www.b4x.com/b4j.html

Delete all files in the keys folder.
Revoke the certificates in Apple developer console.
Create new ones.

 
Upvote 0

Matt S.

Member
Licensed User
Make sure to use Java 19. Download link available here: https://www.b4x.com/b4j.html

Delete all files in the keys folder.
Revoke the certificates in Apple developer console.
Create new ones.

I tested with Both Java 14 and 19.
I Removed Provision Profile and Revoked the certificate and started from scratch. But the problem still exists.
I even Installed a fresh MacOS on VMware to get a new CertificateSigningRequest.

By the way I am using Hosted Mac Builder.
 
Upvote 0

Matt S.

Member
Licensed User
Make sure to use Java 19. Download link available here: https://www.b4x.com/b4j.html

Delete all files in the keys folder.
Revoke the certificates in Apple developer console.
Create new ones.

And Also This is the complete message:
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: <Our company AppleID>" in the keychain. To sign with this signing certificate, install its private key in your keychain. If you don't have the private key, select a different signing certificate for CODE_SIGN_IDENTITY in the build settings editor. (in target 'B4iProject' from project 'B4iProject')

Error: ** BUILD FAILED **
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
After Setting the path to Java 19 and Empty Keys Folder

HOW TO GENERATE CERTIFICATESIGNINGREQUEST

1. Open the IDE and goto Tools->Private Sign Keys
2. Set Your password, you can leave the name and others Unknown
3. Click Create NEW
Open your keys folder, you should now see these files
B4i.keystore, certificateSigningRequest.csr and B4i.p12

From here, goto Developer console and use the certificateSigningRequest to create your certificates
 
Last edited:
Upvote 0

Matt S.

Member
Licensed User
If you ae on windows using Hosted Builder. I believe all the steps are supposed to be done on windows. You don't need MacOS on VMWare.
I used MacOS on VMWare only for creating CertificateSigningRequest at the beginning to request for certificate (I don't know if there is other solutions to do that). All other steps were done on Windows.
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
After Setting the path to Java 19 and Empty Keys Folder

HOW TO GENERATE CERTIFICATESIGNINGREQUEST

1. Open the IDE and goto Tools->Private Sign Keys
2. Set Your password, you can leave the name and others Unknown
3. Click Create NEW
Open your keys folder, you should now see these files
B4i.keystore, certificateSigningRequest.csr and B4i.p12

From here, goto Developer console and use the certificateSigningRequest to create your certificates

Follow this steps to get the Certificate Signing Request. - It is generated by the IDE
 
Upvote 0

Matt S.

Member
Licensed User
Yes, Start Everything Fresh
I used "certSigningRequest.csr" that was generated by B4i to create a new Certificate and created a new Provision Profile. Then I downloaded the "ios_distribution.cer" and ProvisionProfile and copied them in Key folder. then I created the private key (3 files). But the error still exists. :(
 
Upvote 0
Top