iOS Tutorial Installing B4i-Bridge and debugging first app

Discussion in 'iOS Tutorials' started by Erel, Oct 21, 2014.

  1. Erel

    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.

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

    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):



    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:
    - 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:
    [​IMG]

    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. 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: Oct 3, 2017
    JanPRO, Bacila Manuel, MarcB and 5 others like this.
  2. tuhatinhvn

    tuhatinhvn Active Member Licensed User

    Nice, same B4A, waiting to beta version to test ^^ thank erel
     
  3. little3399

    little3399 Active Member Licensed User

    Hi, Erel

    Why I want to install B4i-Bridge , It prompt me to input password ...


    [​IMG]

    B4I_01.jpg

    B4I_02.png
    [​IMG][​IMG]
    [​IMG][​IMG]
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Have you tried to enter your passcode?

    This link installs a certificate on your device that is required for over the air installations for the remote builders.

    Note that you can always delete the certificate (and reinstall it) under Settings - General - Profiles.
     
    Pintinho likes this.
  5. netkomm

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

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    luke2012 likes this.
  7. inakigarm

    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
     

    Attached Files:

  8. netkomm

    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")
     
  9. Erel

    Erel Administrator Staff Member Licensed User

  10. netkomm

    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
     
    Erel likes this.
  11. Erel

    Erel Administrator Staff Member Licensed User

  12. netkomm

    netkomm Active Member Licensed User

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

    Erel Administrator Staff Member Licensed User

  14. inakigarm

    inakigarm Well-Known Member Licensed User

    Thanks Erel all is working

    First mini app on IPAD !!
     
    Erel likes this.
  15. imbault

    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
     
    Erel likes this.
  16. Valtron

    Valtron Member Licensed User

    Thanks Erel, everything up and running here !
     
    Erel likes this.
  17. Homerclese

    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."???
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    A provisioning profile is tied to a specific App Id. You can see it in this screenshot:

    [​IMG]

    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).
     
  19. GiulioVale

    GiulioVale Active Member Licensed User

    Hi Erel if I remember correctly you need always App Id with asterisk otherwise bridge is not installed
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    This is true (it is written in the certificates tutorial). The bridge package name is <project package name>.bridge. If the App Id doesn't end with a wildcard then the bridge package name will be rejected.

    Note that you can install B4i-Bridge and then change to a different provisioning profile if you need an explicit id.
     
Loading...