$ npm install capacitor-background-geolocation-firebase --save
$ npx cap sync
$ yarn add capacitor-background-geolocation-firebase
$ npx cap sync
Add the following code:
import UIKit
import Capacitor
import TSBackgroundFetch
+import FirebaseCore
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
+ FirebaseApp.configure()
.
.
.
return true
}
}
From your Firebase Console, copy your downloaded Google-Services-Info.plist
file into your application: