iOS Question Firebase and GeoFire

tonym1995

Member
Hi,

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.

Regards,
Tony
 

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 https://www.firebase.com/docs/ios/ 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.
 
Upvote 0

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 https://cdn.firebase.com/java/firebase-client-android-2.3.0.jar
and the GeoFire client from https://github.com/firebase/geofire-java/releases

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?
 
Upvote 0

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?
 
Upvote 0

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:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
...while parsing rollem/b4a/sample/FirstLib.class
1 error; aborting
Optimized dexer failed. Switching to Standard dexer.
 
Upvote 0
Top