Firebase Analytics is a free, out-of-the-box analytics solution that inspires actionable insights based on app usage and user engagement.
This robopod includes Core and InstanceID frameworks as well.
- Firebase is a large library (+500MB) divided in sub modules, each of them including several frameworks. Download ZIP with frameworks from here: Link
- Unzip, go into 'Analytics' subdirectory and copy all of the frameworks into the libs folder inside your RoboVM project.
- Add the following to your
robovm.xml
<config>
...
<frameworkPaths>
<path>libs</path>
</frameworkPaths>
<frameworks>
<framework>FIRAnalyticsConnector</framework>
<framework>FirebaseAnalytics</framework>
<framework>FirebaseCore</framework>
<framework>FirebaseCoreDiagnostics</framework>
<framework>FirebaseInstanceID</framework>
<framework>GoogleAppMeasurement</framework>
<framework>GoogleUtilities</framework>
<framework>nanopb</framework>
</frameworks>
</config>
Add the following dependency to your build.gradle
:
dependencies {
... other dependencies ...
compile "com.mobidevelop.robovm:robopods-firebase-ios-analytics:$robopodsVersion"
}
Add the following dependency to your pom.xml
:
<dependency>
<groupId>com.mobidevelop.robovm</groupId>
<artifactId>robopods-firebase-ios-analytics</artifactId>
<version>${robopods.version}</version>
</dependency>
Download 'GoogleService-Info.plist' from Firebase Console and put it into data/ folder of your RoboVM project.
In your AppDelegate
add the following calls to didFinishLaunching(...)
:
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
boolean didFinishLaunching = super.didFinishLaunching(application,
launchOptions);
FIRApp.configure()
return didFinishLaunching;
}