Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase: FIRApp.configure() keeps wanting me to change it to FirebaseApp.configure()

So I made a project that included lots of extra code so I could try out different things, and I am slowly copy-pasting the files from textedit into my new project.

I created a new Firebase account, added the google plist file, initialized and installed the pods needed (also changed the iOS version to 10.0 on the pod file)... yet it's still wanting me to use FirebaseApp.configure() instead of FIRApp.configure().

Should I just delete the whole thing and try again? I just created a new Xcode project, so if I had to delete it right now that would be fine.

import UIKit
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    override init() {
        super.init()

    }

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

        FIRApp.configure()

        return true
    }

There hasn't been much code written, but I can't figure out what could have made this happen... especially since I just started the new project.

like image 492
HappyMouse Avatar asked May 22 '17 16:05

HappyMouse


People also ask

How do I configure the environment of a firebase function?

Some configuration is automatically provided under the reserved firebase namespace. Environment configuration is made available inside your running function via functions.config () . To use the configuration above, your code might look like this:

How do I use the firebase SDK for Cloud Functions?

The Firebase SDK for Cloud Functions offers built-in environment configuration to make it easy to store and retrieve this type of data for your project. To store environment data, you can use the firebase functions:config:set command in the Firebase CLI .

How do I clone an existing project in Firebase?

firebase functions:config:clone --from <fromProject> clones another project's environment into the currently active project. There are environment variables that are automatically populated in the functions runtime and in locally emulated functions. These include those populated by Google Cloud , as well as a Firebase-specific environment variable:


2 Answers

FirebaseApp.configure() is correct. I checked out the documentation just now and FIRApp.configure() has been renamed FirebaseApp.configure(). I also ran pod update on one of my projects just to confirm, and my project had me change to using FirebaseApp.configure(). So no need to rebuild!

like image 186
Jen Person Avatar answered Oct 23 '22 22:10

Jen Person


I can confirm that FIRApp.configure() can be changed to FirebaseApp.configure()

like image 1
K-A Avatar answered Oct 23 '22 22:10

K-A