title: The default FirebaseApp instance must be configured before the defaultFirebaseApp instance can be initialized
body: <p>I am trying to configure the Firebase using <code>FirebaseApp.configure()</code> but facing the following crash:</p>
  
  <pre><code> *** Terminating app due to uncaught exception 'com.firebase.installations', reason: 'The default FirebaseApp instance must be configured before the defaultFirebaseApp instance can be initialized. One way to ensure that is to call `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) in the App Delegate's `application:didFinishLaunchingWithOptions:` (`application(_:didFinishLaunchingWithOptions:)` in Swift).'
  *** First throw call stack:
  (0x195b7180c 0x195899fa4 0x195a66f84 0x1081413dc 0x107c59bc0 0x107c59aec 0x10274daa0 0x10274d5c0 0x10274c8ec 0x10274c310 0x10274c25c 0x10244b52c 0x10244b434 0x10244b5c4 0x199bda698 0x102451ad4 0x195974360)
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>
  
  <p>I tried calling <code>FirebaseApp.configure()</code> from inside <code>didFinishLaunchingWithOptions</code> and inside the <code>init</code> of <code>AppDelegate</code> as well:</p>
  
  <pre><code>override init() {
          super.init()
  
          // Setting up the firebase instance
          setupFirebase()
      }
  
  private func setupFirebase() {
  
          FirebaseApp.configure()
  
          Messaging.messaging().delegate = self    
      }
  </code></pre>
  
  <p>It's crashing at this point - 
  <img src="https://user-images.githubusercontent.com/42940300/76974017-b1d74300-6956-11ea-81fe-60eabde463e6.png" alt="Screenshot 2020-03-18 at 8 10 39 PM"></p>
  
  <p>I am using <code>import FirebaseCore</code> &amp; <code>import FirebaseMessaging</code> inside my <code>AppDelegate</code></p>
  
  <p>The <code>Podfile.lock</code> looks like this</p>
  
  <pre><code>Firebase/Core (6.20.0):
      - Firebase/CoreOnly
      - FirebaseAnalytics (= 6.3.1)
    - Firebase/CoreOnly (6.20.0):
      - FirebaseCore (= 6.6.4)
    - Firebase/Database (6.20.0):
      - Firebase/CoreOnly
      - FirebaseDatabase (~&gt; 6.1.4)
    - Firebase/Firestore (6.20.0):
      - Firebase/CoreOnly
      - FirebaseFirestore (~&gt; 1.11.2)
    - Firebase/Messaging (6.20.0):
      - Firebase/CoreOnly
      - FirebaseMessaging (~&gt; 4.3.0)
    - FirebaseAnalytics (6.3.1):
      - FirebaseCore (~&gt; 6.6)
      - FirebaseInstallations (~&gt; 1.1)
      - GoogleAppMeasurement (= 6.3.1)
      - GoogleUtilities/AppDelegateSwizzler (~&gt; 6.0)
      - GoogleUtilities/MethodSwizzler (~&gt; 6.0)
      - GoogleUtilities/Network (~&gt; 6.0)
      - "GoogleUtilities/NSData+zlib (~&gt; 6.0)"
      - nanopb (= 0.3.9011)
    - FirebaseAnalyticsInterop (1.5.0)
    - FirebaseAuthInterop (1.1.0)
    - FirebaseCore (6.6.4):
      - FirebaseCoreDiagnostics (~&gt; 1.2)
      - FirebaseCoreDiagnosticsInterop (~&gt; 1.2)
      - GoogleUtilities/Environment (~&gt; 6.5)
      - GoogleUtilities/Logger (~&gt; 6.5)
    - FirebaseCoreDiagnostics (1.2.2):
      - FirebaseCoreDiagnosticsInterop (~&gt; 1.2)
      - GoogleDataTransportCCTSupport (~&gt; 2.0)
      - GoogleUtilities/Environment (~&gt; 6.5)
      - GoogleUtilities/Logger (~&gt; 6.5)
      - nanopb (~&gt; 0.3.901)
    - FirebaseCoreDiagnosticsInterop (1.2.0)
    - FirebaseDatabase (6.1.4):
      - FirebaseAuthInterop (~&gt; 1.0)
      - FirebaseCore (~&gt; 6.0)
      - leveldb-library (~&gt; 1.22)
    - FirebaseFirestore (1.11.2):
      - abseil/algorithm (= 0.20190808)
      - abseil/base (= 0.20190808)
      - abseil/memory (= 0.20190808)
      - abseil/meta (= 0.20190808)
      - abseil/strings/strings (= 0.20190808)
      - abseil/time (= 0.20190808)
      - abseil/types (= 0.20190808)
      - FirebaseAuthInterop (~&gt; 1.0)
      - FirebaseCore (~&gt; 6.2)
      - "gRPC-C++ (= 0.0.9)"
      - leveldb-library (~&gt; 1.22)
      - nanopb (~&gt; 0.3.901)
    - FirebaseInstallations (1.1.0):
      - FirebaseCore (~&gt; 6.6)
      - GoogleUtilities/UserDefaults (~&gt; 6.5)
      - PromisesObjC (~&gt; 1.2)
    - FirebaseInstanceID (4.3.2):
      - FirebaseCore (~&gt; 6.6)
      - FirebaseInstallations (~&gt; 1.0)
      - GoogleUtilities/Environment (~&gt; 6.5)
      - GoogleUtilities/UserDefaults (~&gt; 6.5)
    - FirebaseMessaging (4.3.0):
      - FirebaseAnalyticsInterop (~&gt; 1.5)
      - FirebaseCore (~&gt; 6.6)
      - FirebaseInstanceID (~&gt; 4.3)
      - GoogleUtilities/AppDelegateSwizzler (~&gt; 6.5)
      - GoogleUtilities/Environment (~&gt; 6.5)
      - GoogleUtilities/Reachability (~&gt; 6.5)
      - GoogleUtilities/UserDefaults (~&gt; 6.5)
      - Protobuf (&gt;= 3.9.2, ~&gt; 3.9)
  </code></pre>
  
  <p>Here's what the stack trace looks like: </p>
  
  <pre><code> thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
      frame #0: 0x0000000195969ec4 libsystem_kernel.dylib`__pthread_kill + 8
      frame #1: 0x0000000195885774 libsystem_pthread.dylib`pthread_kill$VARIANT$mp + 112
      frame #2: 0x00000001957d9844 libsystem_c.dylib`abort + 100
      frame #3: 0x00000001959327d4 libc++abi.dylib`abort_message + 128
      frame #4: 0x00000001959329c4 libc++abi.dylib`demangling_terminate_handler() + 296
      frame #5: 0x000000019589a258 libobjc.A.dylib`_objc_terminate() + 124
      frame #6: 0x000000019593f304 libc++abi.dylib`std::__terminate(void (*)()) + 16
      frame #7: 0x000000019593ec58 libc++abi.dylib`__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 32
      frame #8: 0x000000019593ec18 libc++abi.dylib`__cxa_throw + 124
      frame #9: 0x000000019589a0d0 libobjc.A.dylib`objc_exception_throw + 356
      frame #10: 0x0000000195a66f84 CoreFoundation`+[NSException raise:format:] + 108
    * frame #11: 0x0000000107f993dc LocationTrackingFW`+[FIRInstallations installations](self=FIRInstallations, _cmd="installations") at FIRInstallations.m:159:5
      frame #12: 0x0000000107ab1bc0 LocationTrackingFW`+[FIRAnalytics updateFirebaseInstallationID] + 32
      frame #13: 0x0000000107ab1aec LocationTrackingFW`+[FIRAnalytics startWithConfiguration:options:] + 564
      frame #14: 0x00000001025cdac0 Field Service`-[FIRApp configureCore](self=0x0000000280a1b510, _cmd="configureCore") at FIRApp.m:364:9
      frame #15: 0x00000001025cd5e0 Field Service`+[FIRApp addAppToAppDictionary:](self=0x00000001035a2f20, _cmd="addAppToAppDictionary:", app=0x0000000280a1b510) at FIRApp.m:317:7
      frame #16: 0x00000001025cc90c Field Service`+[FIRApp configureWithName:options:](self=0x00000001035a2f20, _cmd="configureWithName:options:", name=@"__FIRAPP_DEFAULT", options=0x0000000280a1b750) at FIRApp.m:202:5
      frame #17: 0x00000001025cc330 Field Service`+[FIRApp configureWithOptions:](self=0x00000001035a2f20, _cmd="configureWithOptions:", options=0x0000000280a1b750) at FIRApp.m:145:3
      frame #18: 0x00000001025cc27c Field Service`+[FIRApp configure](self=0x00000001035a2f20, _cmd="configure") at FIRApp.m:131:3
      frame #19: 0x00000001022cb54c Field Service`AppDelegate.setupFirebase(self=0x0000000109f08a00) at AppDelegate.swift:272:21
      frame #20: 0x00000001022cb454 Field Service`AppDelegate.init() at AppDelegate.swift:42:9
      frame #21: 0x00000001022cb5e4 Field Service`@objc AppDelegate.init() at &lt;compiler-generated&gt;:0
      frame #22: 0x0000000199bda698 UIKitCore`UIApplicationMain + 1728
      frame #23: 0x00000001022d1af4 Field Service`main at AppDelegate.swift:21:7
      frame #24: 0x0000000195974360 libdyld.dylib`start + 4
  </code></pre>
  
  <p>Been stuck on this for hours now. Can anyone please help me out</p>