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:

fbritop

Active Member
Licensed User
Longtime User
I have received an iPhone 6 recently for testing.
I have followed all the steps, before I6, i had an I5 for dev which was running ok. Only a few warnings regarding outdated bridge, but still was compilling.

I installed the bridge on I6 with no problem. I can connect to the bridge, see form items move arround, etc.

There is no way my app will compile, or maybe it does, but it does not show on the URL (XXX for username hidding).

http://63.135.170.51:51041/xxxxxxx --
No build is currently available. Refresh the page if you have already compiled the project.

http://63.135.170.51:51041/tests --
B4i Build Server
Build server is running.
Version: 2.51
Server time: 00:50:57
Mac SSL Key
Key IP: 63.135.170.51
SSL port: 51042


When the app finishes compiling, the I6 has the typical install msgbox question, but the it states that the file cannot be downloaded.

I've checked the certificates in apple and locally. Tha bridge was installed with no problem. Any hints where the error could be?

Using b4i 2.51 registered

---- I have regenerated all certificates and prov files. Now the error goes to the remote compiler. I have try also with a minimal proyect with no libraries at all with the same results.

B4i version: 2.51
Parsing code. (0.00s)
Compiling code. (0.03s)
Compiling layouts code. (0.00s)
Compiling debugger engine code. (0.81s)
Building Xcode project (0.02s)
Sending data to remote compiler. Error
 
Last edited:

affable

Member
Licensed User
Longtime User
Trying to install B4iBridge (local macbuilder, works fine on Simulator)
When I click on the circle 'Install App' I am getting the message 'Open this page in "App Store"?', then randomly it pops up cannot connect to 10.94.72.5 (an IP I know nothing of, my local macbuilder is 192.168.8.105).
When I look at my App ID I see that it has An App ID Prefix (Team ID) which doesn't appear in the video tutorials. Is this something new or am I creating my App ID incorrectly?

I've checked the UDID for the iPod Touch is correct
I've installed the B4I certificate and checked it is in profiles.
I've checked my package in Build Configurations

Any other suggestions?
 
Last edited:

affable

Member
Licensed User
Longtime User
I've sent you a temporary id for the hosted builder. Please test it. It will help with understanding the source of the problem.
That hosted builder worked so B4iBridge is now installed on my iPod. What's next?
 

stari

Active Member
Licensed User
Longtime User
Hi,
i wish to add phone - iPhone 7.
So i make this:
1. delete all files in /key folder
2. install B4I certificate (Safari)
3 added new phone
4. i make all steps, as descriebed in tutorial
5. i test with my old phone with new certificate and provision files
6. al is working OK
7. i wish to work with iPhone 7 and i go to Build-Server Build B4I Bridge
8. then i get this error

Sending data to remote compiler. Error
Out: Build settings from command line:
ARCHS = armv7
CODE_SIGN_IDENTITY = iPhone
CONFIGURATION_BUILD_DIR = /Users/administrator/Documents/UploadedProjects/<user id>/Payload
OTHER_CODE_SIGN_FLAGS = --keychain <user id>
PRODUCT_NAME = B4i-Bridge
PROVISIONING_PROFILE = 57d737ac-2607-4e8e-8d3b-970468f73b8f
=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===
Check dependencies
Code Sign error: Provisioning profile does not match bundle identifier: The provisioning profile specified in your build settings (“medwell”) has an AppID of “com.medwell.ELFEmmit” which does not match your bundle identifier “com.medwell.ELFEmmit.bridge”.

Error: ** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)


What is wrong ?
 

stari

Active Member
Licensed User
Longtime User
The developer certificate is always mandatory to build an app ? Also if I wish to put an app only on the phisical device without pushing it to the app store ?
No, it's not for building app. But i wish to develop on iPhone 7. I have make all required steps and iPhone 4s is working normaly. Only with new phone i have troubles.
I can't push app to phisical device, because i get error by "Build Bridge Application". So, my phone is not connected to b4i.
You can push app to phisical device only with developer certificate.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

Ganiadi

Active Member
Licensed User
Longtime User
Hi,
Im new and did all the steps above and now im trying to compile using hosted builder and it success, but when it downloading to my apple 4 it always mentioned an error
Unable to Download App
"B4i Example" could not be installed this time
Pls advice...
 

Ganiadi

Active Member
Licensed User
Longtime User
Yes i did call www.b4x.com/ca.pem and install it
then click Build B4i-Bridge and installed B4i-Bridge
B4i - Success installed on iPhone
Launch B4i and compile apps and when the apps downloading to iPhone the error appear..
 
Status
Not open for further replies.
Top