Skip to content

iOS Guide

Mk5 edited this page Mar 12, 2021 · 14 revisions

1. Add ios dependencies

dependencies { 
    implementation "pl.mk5.gdx-fireapp:gdx-fireapp-core:$gdxFireappVersion" # this one is also important because of robovm compiling process
    implementation "pl.mk5.gdx-fireapp:gdx-fireapp-ios:$gdxFireappVersion"
}

2. Add firebase configuration file in to your project

Download GoogleService-Info.plist from firebase console and add it into ios/data folder.

3. Install frameworks

3.1 Download required frameworks

In order to use firebase you need to download Firebase SDK frameworks. Just download it from here: https://firebase.google.com/download/ios, and unzip it somewhere.

3.2 Unzip&copy frameworks into a project

Just copy&paste all frameworks you want to use into ios/libs folder. The target structure should like something like:

libs -> 
   AppAuth.framework
   FirebaseAuth.framework
   FirebaseCore.framework 
   ...

3.3 Modify robovm.xml

You have to add frameworks, and force link gdx-fireapp.

  <frameworkPaths>
    <path>libs</path>  <!-- path where FirebaseXXX.framework is located -->
  </frameworkPaths>
  <forceLinkClasses>
    <pattern>pl.mk5.gdx.fireapp.ios.**</pattern>
  </forceLinkClasses>
  <frameworks>
    <framework>UIKit</framework>
    <framework>OpenGLES</framework>
    <framework>QuartzCore</framework>
    <framework>CoreGraphics</framework>
    <framework>OpenAL</framework>
    <framework>AudioToolbox</framework>
    <framework>AVFoundation</framework>
    <framework>LocalAuthentication</framework>

    <framework>AppAuth</framework>
    <framework>FirebaseAnalytics</framework>
    <framework>FirebaseAuth</framework>
    <framework>FirebaseCore</framework>
    <framework>FirebaseCoreDiagnostics</framework>
    <framework>FirebaseCrashlytics</framework>
    <framework>FirebaseDatabase</framework>
    <framework>FirebaseStorage</framework>
    <framework>FirebaseInstallations</framework>
    <framework>GoogleAppMeasurement</framework>
    <framework>GoogleDataTransport</framework>
    <framework>GTMAppAuth</framework>
    <framework>GTMSessionFetcher</framework>
    <framework>GoogleUtilities</framework>
    <framework>GoogleSignIn</framework>
    <framework>leveldb-library</framework>
    <framework>nanopb</framework>
    <framework>PromisesObjC</framework>
  </frameworks>

4. Initialize firebase

GdxFIRApp.inst().configure()
Clone this wiki locally