Sunday, June 28, 2026
HomeiOS Developmentswift - How do you initialise Firebase code for iOS Flutter mission?

swift – How do you initialise Firebase code for iOS Flutter mission?

[ad_1]

Engaged on an app to assist study Flutter and Firebase, the front-end has all been sorted, beginning to work on the Firebase aspect and as I used to be following the directions on the Firebase web page which learn:

class AppDelegate: UIResponder, UIApplicationDelegate {

  var window: UIWindow?

  func software(_ software: UIApplication,
    didFinishLaunchingWithOptions launchOptions:
      [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    FirebaseApp.configure() //THIS LINE WAS ADDED

    return true
  }
}

For readability, the adjustments they make to the file I’ve added a remark to these strains. Mine does not fairly seem like this, so I used to be questioning if I’ve applied this accurately:

@objc class AppDelegate: FlutterAppDelegate {
  override func software(
    _ software: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    FirebaseApp.configure() //THIS LINE WAS ADDED
    GeneratedPluginRegistrant.register(with: self)
    return tremendous.software(software, didFinishLaunchingWithOptions: launchOptions)
  }
}

In keeping with Xcode, there isn’t any errors thrown by this, however I need to ensure that that is the right implementation of what the Firebase workforce meant, since my AppDelegate file appeared nothing like theirs in any respect.

Thanks prematurely for any assist 🙂

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments