Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions firoptions/FiroptionConfiguration/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

// [START default_configure_file]
// Load a named file.
let filePath = Bundle.main.path(forResource: "MyGoogleService", ofType: "plist")
guard let fileopts = FirebaseOptions(contentsOfFile: filePath!)
else { assert(false, "Couldn't load config file") }
FirebaseApp.configure(options: fileopts)
guard
let filePath = Bundle.main.path(forResource: "MyGoogleService", ofType: "plist"),
let fileOptions = FirebaseOptions(contentsOfFile: filePath)
else { fatalError("Couldn't load config file.") }
FirebaseApp.configure(options: fileOptions)
// [END default_configure_file]

// Note: this one is not deleted, so is the default below.
Expand Down Expand Up @@ -69,7 +70,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

// Retrieve a previous created named app.
guard let secondary = FirebaseApp.app(name: "secondary")
else { assert(false, "Could not retrieve secondary app") }
else { fatalError("Could not retrieve secondary app") }


// Retrieve a Real Time Database client configured against a specific app.
Expand All @@ -80,7 +81,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let defaultDb = Database.database()

guard let defapp = FirebaseApp.app()
else { assert(false, "Could not retrieve default app") }
else { fatalError("Could not retrieve default app") }

assert(secondaryDb.app == secondary)
assert(defaultDb.app == defapp)
Expand Down
Loading