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.

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.basic4ppc.com/android/fo...a-certificate-and-provisioning-profile.45880/
2. Make sure that the App Id ends with a wildcard.
 
Last edited:

ebasic

Member
Licensed User
Weird, when I click on "build b4i-bridge app" it builds and when I visit xxx.xxx.xxx.xxx:port/id I can clearly see: "Click on the button to download your latest build: Product name: b4i-bridge" and the install app - button but clicking it does nothing. Any help on this or are more details needed?

Regards
 

ebasic

Member
Licensed User
Hello Erel - thank you for your answer.

When using local builder a simple "Sending data to remote compiler. Error . Communication error: SendFailure" appears.
The hosted builder however works fine.

Some output from local builder: http://pastebin.com/5VC7LNhr

The java executable is currently in Downloads (I´m running windows10 on top of parallels VM on a Macbook pro with Sierra)


Regards

EDIT: pardon me, I´ve just tried this https://www.b4x.com/android/forum/threads/error-using-b4iserver.47209/#content (setting the port to ssl) and it works.

One OT question (how much does extending of hosted builder cost for existing users?)

Regards
 
Last edited:

Starchild

Active Member
Licensed User
I feel I am asking the same questions but the existing answers in the forum don't work for me.
I am now trying to work with the B4i suite I purchased early last year.

I have purchased a new Ipad Mini running os 10.2
The b4i-bridge won't install.
After clicking INSTALL, I get the error box, "Unable to Download App"
I have followed the support information regarding checking AppID, UDID and recreating certificates and provisioning profiles. I have tried several times.
I verified the B4I certificate is installed on my Ipad Mini.

As my access to the Hosted builder expired I acquired an iMac to use (running Capitan 10.11.4).
I have set up a local builder.
Installed everything as required Xcode 7.2.1 and current JDK.
I believe the builder to be working fine.

If I use my son's Ipad (already have bridge installed on it from early last year) then my test program installs fine and runs.
I can also compile, install and run apps into the Ipad simulator on the iMac.

It looks like a UDID problem (for my new Ipad Mini). But as stated I have verified this. I installed iTunes and compared this with my Registered device (for Ipad Mini) in my Apple developer account.

Has anyone else had problems installing the B4i-bridge onto the new Ipad Mini?

Any other suggestions at this time would be appreciated.
 

ilan

Expert
Licensed User
i have the same problem here.
cannot connect to 192.168.14.106

i am using mac builder 4.01 and b4i 4.01

it started to happen on b4i 4.01. i have also a hosted builder account so using it is working but using the localbuilder i can connect to it via .../test and also create a b4i bridge but when i hit the circle on my iphone to install the b4i bridge i get an error "Cannot connect to 192.168.14.106" :(

i need to use the local builder to use a lib that is not available in the hosted builder. what can i do?

EDIT: now i also cannot connect to ip_address of hosted builder too.
 
Last edited:

Buks

Member
Licensed User
Problem to install B4i Bridge on IPhone:
When I click on the "Install App" button after entering the IP address in Safari browser, I get a message "Cannot connect to ip_address"
 

ilan

Expert
Licensed User
Lets start with the hosted builder.

I've tested it with the one that starts with 208 and it installed successfully. Is it still not working for you?

Sorry erel but what do you mean with 208?
 

ilan

Expert
Licensed User
The hosted builder ip address.

ok i just had the chance to test it with the hosted builder. unfortunately the ip that b4i is given me is 63.135.170.51:51041
and that hosted builder is not working.
 

ilan

Expert
Licensed User
I think that I know the cause of this issue. Have you upgraded to iOS 11?

I am not sure what ios i have but i did upgraded to the latest one on my iphone 5s.

Before i did the upgrade it worked with the hosted builder but not with the local builder so i upgraded my phone because i thought it will solve the local builder issue but then the hosted build also stoped working.
 

ilan

Expert
Licensed User
You can check the version under Settings - General - About.

Yes i know i just dont have my iphone with me and i dont remember what ios upgrade it was but if ios11 is running on iphone 5s then i assume it is ios11.

Anyway it worked before the update BUT only on the hosted builder and not on the local builder and i have the latest local builder v4.01 so i cant explain why it is like that. I guess the local builder is the same as the hosted builder so why it worked before the upgrade only on the hosted builder, i dont know??

But now it doesnot work on both.
 

Buks

Member
Licensed User
My version: 10.3.2(14F89)
While in the settings, I went to the Certificate Trust Settings and realised that the B4i trust was OFF. I turned it on and it installed.
 
Status
Not open for further replies.
Top