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:

Adilson Jacinto

Active Member
Licensed User
Longtime 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.

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


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.

Make sure to see the video in HD mode (press on the small gear button to change mode):


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

Tips:
- You don't need to wait for the installation animation to complete. Once the animation starts you can click on the app icon.
- If the installation is stuck in the "waiting" step for more than 10 or 15 seconds then uninstall it and install it again.
- 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 B4I certificate is installed. You can check it under Settings - General - Profile:
SS-2014-10-30_10.39.29.png


2. Make sure that the mobile provisioning file includes the device UDID.

3. If it doesn't help restart the phone and try again.

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.


Hi Erel, I having problems in running this on my device, the strange thing is I can connect to B4i bridge but when I run the debug it does install the app, but no errors are shown, so what am I doing wrong?

Thanks


Adi
 

Mark Turney

Active Member
Licensed User
Longtime User
We've all been there Adi :confused: ... Great job figuring it out!

Mark
 

AHilton

Active Member
Licensed User
Longtime User
I'm not able to build the B4i-Bridge App. B4i 2.00, XCode 7.0 beta 6 (7A192o), local builder, made the cer, csr and mobileprovision files. Here's the last bit of the error shown...


/Users/AndrewHilton/Desktop/macserver-2/UploadedProjects/azrctg5/B4iProject/main.m:17:2: error: use of undeclared identifier 'B4I'
B4I* bi = [self valueForKey:mad:"bi"];
^
/Users/AndrewHilton/Desktop/macserver-2/UploadedProjects/azrctg5/B4iProject/main.m:17:7: error: use of undeclared identifier 'bi'
B4I* bi = [self valueForKey:mad:"bi"];
^
/Users/AndrewHilton/Desktop/macserver-2/UploadedProjects/azrctg5/B4iProject/main.m:18:3: error: use of undeclared identifier 'bi'
[bi raiseUIEvent:nil event:mad:"application_fetchdownload" params:nil];
^
3 errors generated.

Error: ** BUILD FAILED **

The following build commands failed:
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o B4iProject/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
 

Mark Turney

Active Member
Licensed User
Longtime User
Do you still have Xcode 6 installed? I would see if perhaps it's because of some change in the beta of Xcode 7.
 

umberto_dev

Member
Licensed User
Longtime User
Hello. I bought B4i yesterday. I followed all the information. I have an hosted B4i Mac. When I try to compile to bridge on my iphone Safari I get the following message:
No build is currently available, Refresh the page if you have already compiled the project.
Click here to refresh page.
Of course I tryied to refresh but I got no difference.
On the IDE it says it's OK.
How can I fix it?
 

Attachments

  • idemsg.png
    idemsg.png
    15.1 KB · Views: 362
Last edited:

umberto_dev

Member
Licensed User
Longtime User
Hello Erel, btw I registered yesterday evening using another email, since I only had a link you sent me by mail when the new B4X was released, and my PayPal account was connected to that email.
I have bought B4i since I like B4A very much and I hope I can port my Android apps to IOS with a minumum effort.
Now I'm a bit in hurry since I have to deploy an app two days ago ;-)
Thank you so much for your precious help and your fantastic results with these producs.
 

Prosg

Active Member
Licensed User
Longtime User
i have the same problem of umberto_dev... how can i fix this ?
 

umberto_dev

Member
Licensed User
Longtime User
i have the same problem of umberto_dev... how can i fix this ?
Hello Prosg,
actually I found it was my fault. I omitted the last letter (the one that represents my VM on the on the hosted Mac Builder) when I typed the URL on my iPhone.
So my advice is to check what you typed on the URL bar on Safari, probably it's just a mistyping.
Good luck
 

Prosg

Active Member
Licensed User
Longtime User
The bai bridge work now... i can see for exemple the designer but when i compile i have an error :

Code Sign error: Provisioning profile does not match bundle identifier: The provisioning profile specified in your build settings (“fitnjob Development”) has an AppID of “com.fitnjob.prosg.*” which does not match your bundle identifier “com.fitnjob.prosg”.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.4'
Error: ** BUILD FAILED **


but i'm really sure i have a wildcar :

in certificats

com.fitnjob.prosg.*

FIX : I revoke & delete all certificats in my keys folder... i create them again and all works now. Regards
 
Last edited:

foakgul

Member
Licensed User
Longtime User
Hello,

I just got B4i and hosted MAC builder (developing on Windows for now)

I followed all steps necessary to build the Bridge app but I keep getting the error message:

B4i version: 2.30
Parsing code. (0.00s)
Compiling code. (0.02s)
Building designer app. (0.01s)
Building Xcode project (0.01s)
Sending data to remote compiler. Error

Steps I took:
0) B4I certificate installed on device
1) created app id at Apple (com.XYZ.*)
2) private key signed
3) created certificate as instructed
4) created mobile provisioning file as instructed
5) test device UDID entered for previous step
6) server settings have been modified with my user ID and "use hosted builder" selected
7) keys folder set
8) app package name has been selected com.XYZ.bridge

I actually did these steps for a second time after deleting all certificates and mobile provisioning files from Apple to start fresh but still does not work.

Anything I'm missing?

Thanks!
 
Status
Not open for further replies.
Top