iOS Question Unable to install B4i-Bridge

MitchBu

Well-Known Member
Licensed User
Longtime User
I had succeeded on my iPhone 7, but the iPad proves to be more challenging.

I installed the B4i profile, and proceeded to build B4i-Bridge.

Everything seems to work just fine, and I get to the screen where I can download using the QR code.



I scan the QR code, click "Install App", and it never installs. When I tap on the still gray icon, I get a Msgbox saying "Unable to install "B4i-Bridge" Please try again later.

Now, I am puzzled with the point 2. "Make sure that the provisioning profile includes the target device UDID".

How do I get that UDID ?

Which provisioning profile are we talking about ? How do I generate it and install it ?

TIA
 
Last edited by a moderator:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
OK. I tried to follow your tutorials as closely as possible, but this is what I get in the Compile (Build Defaults) window, which has a red bar above. I don't understand what I should do. I have created a new private sign key, but that does not seem to help.

B4X:
B4i Version: 6.80
Parsing code.    (0.00s)
Building folders structure.    (0.02s)
Compiling code.    (0.00s)
Building designer app.    (0.01s)
Building Xcode project    (0.15s)
Sending data to remote compiler.    Error
Out: Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Release PRODUCT_NAME=B4i-Bridge CONFIGURATION_BUILD_DIR=/Users/erel/Documents/UploadedProjects/<user id>/Payload "CODE_SIGN_IDENTITY=iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" "OTHER_CODE_SIGN_FLAGS=--keychain <user id>" PROVISIONING_PROFILE=62aed3f6-b354-4633-8ad5-30def591b6bd -arch armv7 -arch arm64

Build settings from command line:
    ARCHS = armv7 arm64
    CODE_SIGN_IDENTITY = iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)
    CONFIGURATION_BUILD_DIR = /Users/erel/Documents/UploadedProjects/<user id>/Payload
    OTHER_CODE_SIGN_FLAGS = --keychain <user id>
    PRODUCT_NAME = B4i-Bridge
    PROVISIONING_PROFILE = 62aed3f6-b354-4633-8ad5-30def591b6bd

note: Using new build system
note: Planning build
note: Constructing build description
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" 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

f0raster0

Well-Known Member
Licensed User
Longtime User
if you created a new key then you have to create new certificates and provisionfile, better delete everything and start from scratch

and then:

make sure you added the UDID of your iPad on Apple Developer account, every time that you add a new device you have to go to Apple and update the devices. then download the new provisiofile
 
Last edited:
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
The error is pretty explicit, though:
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" 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')

My problem is, that certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" is present in the keys folder, and has been installed in the system.

I had hoped there was some hint about what to do in such case.

I ran through the couple tutorials twice already. My fear is that if that do that again, the result will be the same.

keys.PNG


certificate.PNG
 
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
@Erel, I am sorry to tag you again, but I really need your assistance.

For the third time, I followed scrupulously your instructions in the two videos at

and

I really hope you can tell me what to do.

Please help.

Thank you in advance.

The error report clearly states I need a private key matching certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)". I am sorry, but there is no mention in your tutorial of such a private key for that particular certificate. I am using hosted builder. If that makes any difference.

Unless it is the private sign key setup in the project ?

Here is the private sign key I created as new:

private sign.PNG


Here my keys folder:

keys folder.PNG

error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" 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 **
 
Last edited:
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
This error happens when the certificate and provision profile do not match. Delete all files in the keys folder and start from scratch. It will work.

I assume that you are using the hosted builder.

Yes, I do use the hosted builder.

OK. I will try a third time, and make sure the provision profile matches the certificate.

Thank you Erel.
 
Last edited:
Upvote 0

MitchBu

Well-Known Member
Licensed User
Longtime User
Hi Erel,

Again, I followed scrupulously every step in the tutorial.

Here is the content of the Keys folder:

keys folder.PNG

Unfortunately, I still get exactly the same error:

error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" 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')

I may be wrong, but it seems somehow the hosted Mac does not see the p12 and keystore. This would be the missing private key, right ?

Would it be conceivable that they failed to be installed in the hosted Mac keychain at compile time ? Is it possible to check on that Mac ?

Is it possible to reset the Mac ?

I am sorry to bug you, but as it stands, I am stuck and cannot use B4i.

B4i Version: 6.80
Parsing code. (0.00s)
Building folders structure. (0.02s)
Compiling code. (0.00s)
Building designer app. (0.01s)
Building Xcode project (0.13s)
Sending data to remote compiler. Error
Out: Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Release PRODUCT_NAME=B4i-Bridge CONFIGURATION_BUILD_DIR=/Users/erel/Documents/UploadedProjects/<user id>/Payload "CODE_SIGN_IDENTITY=iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" "OTHER_CODE_SIGN_FLAGS=--keychain <user id>" PROVISIONING_PROFILE=00e1d9f6-563d-4e6b-9f39-a414408f2273 -arch armv7 -arch arm64

Build settings from command line:
ARCHS = armv7 arm64
CODE_SIGN_IDENTITY = iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)
CONFIGURATION_BUILD_DIR = /Users/erel/Documents/UploadedProjects/<user id>/Payload
OTHER_CODE_SIGN_FLAGS = --keychain <user id>
PRODUCT_NAME = B4i-Bridge
PROVISIONING_PROFILE = 00e1d9f6-563d-4e6b-9f39-a414408f2273

note: Using new build system
note: Planning build
note: Constructing build description
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: Michel Bujardet (5Q9GY3J7MT)" 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 **
 

Attachments

  • 1609074454079.png
    1609074454079.png
    27.7 KB · Views: 261
Upvote 0

roumei

Active Member
Licensed User
I'm not sure that it's related but why is your certificate ios_distribution.cer younger than the csr file? From my understanding, the csr file is created first and used to create the distribution certificate.
 
Upvote 0
Top