iOS Tutorial Installing B4i-Bridge and debugging first app

Status
Not open for further replies.
B4i-Bridge is an application that you install on the device.
It has three purposes:
1. Launch the installation process when needed. This step is done with Apple Configurator 2 if using a local builder (https://www.b4x.com/android/forum/threads/installing-apps-with-apple-configurator-2.128397/).
2. Run the installed app (when installation is not needed).
3. The bridge is also the WYSIWYG visual designer.
4. Starting from iOS 16 you need to enable developer mode under: Settings - Privacy & Security -> Developer Mode

You need to install B4i-Bridge once. It is done from the device browser.


This video tutorial shows the steps required in order to install B4i-Bridge.

The important steps are:
- Set the package name based on the provision app id.
- Build B4i-Bridge: Tools -> Build Server -> Build B4i-Bridge
- Open mobile Safari and navigate to the link displayed in the compilation window.
- Install B4i-Bridge and run it.



Transcript:
1. Create a new project and save it.
2. Set the package name based on the provision app id (Project - Build Configurations).
3. Tools - Build Server - Build B4i-Bridge app.
4. The compilation dialog will show the link that you need to enter in the device browser.
5. Click on the Install button and confirm the installation.
6. Press on the Home key. B4i-Bridge app should be installed.
7. Start B4i-Bridge. A message with the ip address will be displayed.
8. Set this address in the IDE under Tools - Device IP Address.
9. Run the program. Approve the installation on the device and click on the new installed app.


Note that this is a real device. Not an emulator.

Tips:

- B4i-Bridge must be in the foreground for it to be able to start an installation or to run the application. In most cases it will be in the foreground automatically. If it is not in the foreground then you need to click on it to bring it to the foreground.

Troubleshooting:

Device errors:


1. Make sure that the mobile provisioning file includes the device UDID and that the UDID doesn't start with ffffff (this is a fake id).
2. Select 64 bit under Tools - Build Server - Server Settings.

Compilation errors:
1. First follow the steps in this tutorial: http://www.b4x.com/android/forum/threads/creating-a-certificate-and-provisioning-profile.45880/
2. Make sure that the App Id ends with a wildcard.
 
Last edited:

ciginfo

Well-Known Member
Licensed User
Longtime User
Possible but I don't see what works bad. Can I revoke my certificate at Apple and restart to create a new one? or it is dangerous.
My ID Apple has changed when I reset my device Iphone but it kept my certificate.
Thank you
 

ciginfo

Well-Known Member
Licensed User
Longtime User
I'm desperate, I have configured the paths created certificate and provisioning profile. I installed on my device Iphone OS7 B4i Bridge, everything seems OK and now new error message When debugging first app.

Building designer app. 0.02
Building Xcode project 0.02
Sending data to remote compiler. Error
Communication error: ConnectFailure

I read on the tuto : "You must install the B4 certificate". Install on the device? on the PC, what is?

Thank you
 

ciginfo

Well-Known Member
Licensed User
Longtime User
Yes, of course and B4i certificate installed. B4I is in Settings->General ->Profil
Always the same message :

Building designer app. 0.02
Building Xcode project 0.02
Sending data to remote compiler. Error
Communication error: ConnectFailure

I don't understans. An idea??
Thank you
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This error is not related to certificates. It means that the IDE cannot connect to the server.

I guess that you are using a local Mac builder, right?

Open the browser on your Windows computer and go to the server test page: http://<server ip>:51041/test

Does it work? If yes then make sure that the IDE is configured correctly under Tools - Build Server.
 

ciginfo

Well-Known Member
Licensed User
Longtime User
I use Windows installed on a MacbookPro with bootcamp
When I go to to the server test page http://<server ip>:51041/test I return on Google page
Tools -> Buid server settings are on the uploaded image
 

Attachments

  • tool.png
    tool.png
    14 KB · Views: 415

ciginfo

Well-Known Member
Licensed User
Longtime User
"Have you started the server? What was the output?"
I don't understand this phrase.

I recall that I do not work on Mac but on windows installed on Mac. At the opening of the computer only Windows 7 runs.
I have running : Windows seven, B4i (paths configured, certificate created, and provisioning profilecertificates OK), and Iphone with B4i-Bridge installed OK (certificates, ID APple OK), wifi on computer and Iphone.
Have I another thing to install? What is server?
 

aaronk

Well-Known Member
Licensed User
Longtime User
Erel,
The first post says the following:

You need to install B4i-Bridge once. It is done from the device browser.

Before you install B4i-Bridge you must install the B4I certificate. This step is not shown in the video.
Open Safari (device browser) and navigate to: www.b4x.com/ca.pem

I think the link should be pointing to the new domain name www.b4x.com/ca.pem ?
 

Massimo Linossi

Member
Licensed User
Longtime User
Hi.
I made all the steps for installing the server and it is running. I install the certificate on the iphone and I launched the
builder for the bridge and when I connect from the phone to install the app I receive the message below.
What could it be ? If I check the ip connections with ping all the devices are responding.
I attach the terminal session screenshot if there is something wrong.
 

Attachments

  • IMG_0193.PNG
    IMG_0193.PNG
    162.6 KB · Views: 399
  • Schermata 2014-12-16 alle 13.21.59.png
    Schermata 2014-12-16 alle 13.21.59.png
    96.4 KB · Views: 412

Massimo Linossi

Member
Licensed User
Longtime User
I tried to install B4Bridge with Itunes and the installation was ok.
But when I compile a little test program, at the end the message is the same, that is impossible to connect to the IP of the server.
I can send the program to the phone with Itunes, but is terrible to work in this way, if I have to compile and test a program several times.
 
Status
Not open for further replies.
Top