iOS Question Missing private key for signing certificate


Licensed User
Hi, i have some problems with b4i, i install all certificates and mobile provision, the first time when i debug the app all works correctly. Next i try to modify some things and i compile all, but i have some errors in particular:

B4i Versione: 7.20
Analisi del Codice. (0.01s)
Building folders structure. (0.01s)
Compilazione del codice. (0.01s)
Compilazione del codice di layouts (0.00s)
Compilazione del codice debugger. (0.02s)
Compilazione Progetto Xcode. (0.13s)
Preparing project for builder. (0.02s)
Project size: 0.16 MB
Invio dati a compilatore remoto. Error
Error: security: SecKeychainDelete: The specified keychain could not be found.

Out: Command line invocation:
/Applications/ -configuration Release "PRODUCT_NAME=B4i Example" CONFIGURATION_BUILD_DIR=/Users/erel/Documents/UploadedProjects/<user id>/Payload "CODE_SIGN_IDENTITY=iPhone Distribution: Aeffe srl (N88X5MFZG4)" "OTHER_CODE_SIGN_FLAGS=--keychain <user id>" PROVISIONING_PROFILE=6fc83f76-44e3-4e6b-bafe-c992712916f5 -arch arm64

Build settings from command line:
ARCHS = arm64
CODE_SIGN_IDENTITY = iPhone Distribution: Aeffe srl (N88X5MFZG4)
CONFIGURATION_BUILD_DIR = /Users/erel/Documents/UploadedProjects/<user id>/Payload
OTHER_CODE_SIGN_FLAGS = --keychain <user id>
PRODUCT_NAME = B4i Example
PROVISIONING_PROFILE = 6fc83f76-44e3-4e6b-bafe-c992712916f5

note: Using new build system
note: Using codesigning identity override: iPhone Distribution: Aeffe srl (N88X5MFZG4)
note: Planning build
note: Constructing build description
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: Aeffe srl (N88X5MFZG4)" 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')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'B4iProject' from project 'B4iProject')

Error: ** BUILD FAILED **

Can anyone help me?


B4X founder
Staff member
Licensed User
Longtime User
Based on the error it looks like a mismatch between the certificate and provision profile or the private key.

It doesn't explain why it worked and stopped working. Maybe you changed the provision profile?

In most cases the simple way to solve such issues is to delete the keys, revoke the certificate and create new ones.
Upvote 0