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:

foakgul

Member
Licensed User
Longtime User
Hi Erel,

Yes I'm able to access this site. The top part reads as:

B4i Build Server
Build server is running.
Version: 2.3
Server time: 10:52:31
Mac SSL Key
Key IP: 63.135.170.51
SSL port: 51042

I still keep getting the same error. One difference is when I restarted B4i and tried again, i saw this popup error message: "Please set the device IP address under Tools>Device IP address". Rest of the error is the same: "Sending data to remote compiler. Error"
 

foakgul

Member
Licensed User
Longtime User
I saved the original example code as bridge.b4i file and trying to build bridge app after this step
 

foakgul

Member
Licensed User
Longtime User
Success!

I was able to get the bridge installed as well as the example code using hosted builder.

Thanks a lot Erel!
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
wait...I need a developer certificate for beta-testing? So there is no way to test my app without paying 99$?
Since Xcode7 you dont need any certificate to sideload your app to a device. :(
 

Hyun

New Member
Licensed User
Longtime User
I am a blind person.
Could you provide a text based guide for this kind of essential things?
Even the video clip has no auditory narration.
Thanks
 

Hyun

New Member
Licensed User
Longtime User
When I press the Install button, I got the error message saying "Cannot connect to 63.135.170.51."
What can I do to address this issue? Please help me, Erel.
Thanks!
 

eprime

New Member
Licensed User
Longtime User
When I press the Install button, I got the error message saying "Cannot connect to 192.168.3.116." I've install the B4I certificate... The version of macserver is 2.5
 

sorex

Expert
Licensed User
Longtime User
When you have been working a while with B4i and suddenly have problems with apps that won't install anymore you could try the following.

first check if your certificates didn't expire, if so renew them. if not...

revoke you certificates
recreate your certificates
download your certificates

correct your provisioning profiles by selecting the right certificate (they are in inactive state or something now)
download the provioning profiles

only copy the development certificate and development provisioning profile into the keys folder

open B4i and save the empty project or create a new one (file>new) and save it

project > build configurations > enter your package name matching the entered before for the certificates/provisionings/apps

tools > build server > build B4i Bridge

follow the instruction in the compile log.

once installed and running move the other files back into the keys folder.


In my case a conditional selection of profiles confused something that prevented to build a working bridge again
and the only cure was going via the new empty project and moving the none developer files.

B4X:
#If DEBUG
   #CertificateFile: ios_development.cer
   #ProvisionFile: Development.mobileprovision
#END IF

#If RELEASE
    #CertificateFile: ios_distribution.cer
    #ProvisionFile: general_distribution.mobileprovision    
#END IF

Hopefully it helps someone as I lost almost an entire day to get this working again.
 

Greg Shannon

Member
Licensed User
Longtime User
I've followed all the steps in the video and I can't Build B4i-Bridge App, I'm using Hosted Builder and attached the log (replace my the id in log with xxxxxxx). What do I need to do to fix?
 

Attachments

  • build_log.txt
    8 KB · Views: 406
  • build_log.txt
    8 KB · Views: 389
Status
Not open for further replies.
Top