iOS Tutorial Installing B4i-Bridge and debugging first app

Status
Not open for further replies.

Erel

Administrator
Staff member
Licensed User
B4i-Bridge is an application that you install on the device.
It has three purposes:
1. Launch the installation process when needed.
2. Run the installed app (when installation is not needed).
3. The bridge is also the WYSIWYG visual designer.

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

If you are using a local builder then you need to install the B4I certificate:

Open Safari (device browser) and navigate to: www.b4x.com/ca.pem
iOS 10+: Go to Settings - General - About - Certificate Trust Settings and enable the B4I certificate. The certificate is required for the over the air installation.

It is easy to miss the 'trust' step. It should look like this:



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. (local builder only) Make sure that the B4I certificate is installed. You can check it under Settings - General - Profile:


2. 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).

3. (local builder only) Go to Settings - General - About - Certificate Trust Settings and make sure that B4I is enabled.

4. Select 64 bit under Tools - Build Server - Server Settings.

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

netkomm

Active Member
Licensed User
Hi Erel,

1) I managed to install B4I.
2) The certificate has been installed on the device (Iphone 6 iOS8.1)

now I am trying to run the "empty" app which is open by default. I saved the project. I did set the Java path (JDK 1.6.026) and created a "keys" folder.

The next step would be to set the app id - done.

So I try to compile the Bridge App but I get the following error (see pic).
 

Attachments

inakigarm

Well-Known Member
Licensed User
Same error....;-(

I've created a key, saved the project, assigned the IP Device, installed Bridge certificate on IPAD but when I select Build to Server, it returns this error (see Pdf)
I've connection to the server (I can ping to the server), but even deactivating the Firewall it returns the same error
Thanks
 

Attachments

netkomm

Active Member
Licensed User
ok... I went to the Apple Dev Center to create a certificate but since I have it already installed on my Mac, I have the option greyed out ("iOS App Development")
 

netkomm

Active Member
Licensed User
ok... removed the certificates and created new ones. Installed the Server and run the 1st app...

Fantastic... here we go! :D
 

netkomm

Active Member
Licensed User
Erel, do you have an area where to start posting for B4I? I have the "silly question #1" ready...
 

imbault

Well-Known Member
Licensed User
Congratulations Erel, all worked at the first time!!!

A small app runs on a iphone5s, iPad2 and iPhone4S

Bravissimo
 

Homerclese

Member
Licensed User
Erel I'm confused about the B4i-Bridge instructions. What does this mean: "Set the package name based on the provision app id."???
 

Erel

Administrator
Staff member
Licensed User
A provisioning profile is tied to a specific App Id. You can see it in this screenshot:



Here, the App Id that I used is anywheresoftware.b4i.*

You can only use this provisioning profile with applications that their package name starts with anywheresoftware.b4i. For example anywheresoftware.b4i.example.

When you build the B4i-Bridge app the bridge package name is based on the current app package name (<package name>.bridge).
 

GiulioVale

Active Member
Licensed User
Hi Erel if I remember correctly you need always App Id with asterisk otherwise bridge is not installed
 
Status
Not open for further replies.
Top