iOS Question Firebase and GeoFire

Discussion in 'iOS Questions' started by tonym1995, Jun 5, 2015.

  1. tonym1995

    tonym1995 Member


    I am looking for a rapid development platform for iOS. The essential requirements are:

    1. Be able to access Firebase API.
    2. Be able to use GeoFire API.

    I believe this can be done from reading the forums. Unfortunately I have never programmed in Basic so would need to know the following.

    1. Is there a good tutorial on creating a library from the GeoFire and Firebase API Java code? Unless one already exists.
    2. Is there a good tutorial on best coding practices for B4i?

    If this is all possible then I will buy B4i. It looks like it should do the job nicely.

  2. Erel

    Erel Administrator Staff Member Licensed User

  3. tonym1995

    tonym1995 Member

    Thanks for your reply Erel,

    Firebase is not a regular SQL database and has its own API. It is designed to work with both Android and iOS. You can find examples of apps written in xCode at there are also Android examples. All data is returned as JSON. It is designed for real time data access between many clients. The libraries provide callback to your code when data is added, changed or deleted.

    As I stated before. I have never programmed in Basic before and trying to find out if B4i can connect and use Firebase and GeoFire API's.

    We would prefer not to have to higher an iOS developer. Our Android app has taken long enough to develop in Android Studio. We were hoping the B4i would slash the development time if it can handle Firebase and GeoFire.

    If it will not be able to handle it then we will continue the search for other RAD development tools. I think it would be a valuable asset for B4x to support these two libraries.
  4. tonym1995

    tonym1995 Member

    Ok, I have downloaded the B4a free trial to see if Firebase and GeoFire would work with it. (proof of concept)

    I downloaded the Firebase Client library from
    and the GeoFire client from

    and placed them in my Additional Libraries folder along with the Google Maps jar file. The Google Maps shows in the libs tab of the IDE but not the Firebase and GeoFire.

    It seems the B4a and B4i should do work with these libraries. How do I get them to show so I can use them?
  5. Erel

    Erel Administrator Staff Member Licensed User

    You will need to create a wrapper library for this SDK (one for B4A and one for B4i).
  6. tonym1995

    tonym1995 Member

    How exactly is that done?
  7. Erel

    Erel Administrator Staff Member Licensed User

  8. tonym1995

    tonym1995 Member

    I followed the b4a tutorial and successfully created the FirstLib.xml file. It did not generate the FirstLib.jar file.

    It was a brand new install of eclipse and the FirstLib project is the first thing done in it.

    What step or configuration setup have I missed?
  9. Erel

    Erel Administrator Staff Member Licensed User

  10. tonym1995

    tonym1995 Member

    I created the FirstLib.jar file and got the latest version of Java.

    B4a is using:
    C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe

    Eclipse is using:
    C:\Program Files\Java\jre1.8.0_45

    I have regenerated the Jar file many times and cleaned the project in Eclipse and B4a.

    When I compile I get the following error:

    B4A version 4.30
    Parsing code. 0.05
    Compiling code. 0.16
    Compiling layouts code. 0.03
    Generating R file. 0.06
    Compiling debugger engine code. 0.52
    Compiling generated Java code. 0.73
    Convert byte code - optimized dex. Error
    UNEXPECTED TOP-LEVEL EXCEPTION: bad class file magic (cafebabe) or version (0034.0000)
    ...while parsing rollem/b4a/sample/FirstLib.class
    1 error; aborting
    Optimized dexer failed. Switching to Standard dexer.
  11. Erel

    Erel Administrator Staff Member Licensed User

    You should set the compliance version to Java 7.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice