Home Features Docs Blog Support GitHub

Firebase Analytics


(Алексей Бирюков) #1

Hello, had anyone implemented Firebase Analytics in iOS project with Multi OS Engine? Could you tell me please, what did I do wrong?

I have downloaded GoogleService-Info.plist into the root directory of my project
I have installed FirebaseAnalytics with Cocoa (pod “Firebase/Analytics”)
Then have created binding like this:
{“output”:“src/main/java”,“platform”:“iOS”,“bindings”:[{“type”:“framework”,“name”:“FirebaseAnalytics”,“objcClassGenerationMode”:“Binding”,“frameworkPath”:“xcode/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework”,“packageBase”:“com.test.firebase”,“importCode”:"#import <FirebaseAnalytics/FIRAnalytics.h>"}]}

And I’m confused now, how to initialize my Firebase in Java code. The class FIRAnalytics is available, it has the method init() only. I don’t see anything in my Firebase Console

Thanks!


(Roman Schauenberg) #2

It works for me with this code in IOSMoeLauncher

@Override
public boolean applicationDidFinishLaunchingWithOptions(UIApplication application, NSDictionary<?, ?> launchOptions) {
boolean ret = super.applicationDidFinishLaunchingWithOptions(application, launchOptions);
FIRApp.configure();
return ret;
}

Hope this help


(Алексей Бирюков) #3

Roman Schauenberg, thanks for helping me!

I’m not sure how to bind FIRApp class.
Finally I’ve used https://github.com/mk-5/gdx-fireapp