Reputation: 93
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.
Upvotes: 6
Views: 8363
Reputation: 67
I can confirm that FIRApp.configure()
can be changed to FirebaseApp.configure()
Upvotes: 1
Reputation: 67
In firebase it suggest to add the following to app delegate:
"
import UIKit import Firebase
@UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configure() return true } }
"
This includes the FirebaseApp.configure() command
Upvotes: 0
Reputation: 7546
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!
Upvotes: 8