Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Setup instructions in Swift #24

Open
wizawuza opened this issue Nov 20, 2021 · 2 comments
Open

iOS Setup instructions in Swift #24

wizawuza opened this issue Nov 20, 2021 · 2 comments

Comments

@wizawuza
Copy link

Is your feature request related to a problem? Please describe.
There are currently instructions to set up in iOS at https://github.com/transistorsoft/flutter_background_geolocation_firebase/blob/master/help/INSTALL-IOS.md

Describe the solution you'd like
Please add the specific instructions if we have an AppDelegate.swift file

Thank you.

@christocracy
Copy link
Member

That's easy

@rc8marcelo
Copy link

Sharing how it looks for me, the placement of configure is important because if you place it after GeneratedPluginRegsitrant.register(with: self), it would cause a crash.

import Flutter
import UIKit
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    FirebaseApp.configure()
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants