forked from rekabhq/background_locator
-
Notifications
You must be signed in to change notification settings - Fork 168
Use other plugins in callback
Valentin Tahon edited this page Jul 11, 2022
·
1 revision
no operation needed
in AppDelagate.swift add this lines to didFinishLaunchingWithOptions:
if !hasPlugin("io.flutter.plugins.pathprovider") {
FLTPathProviderPlugin
.register(with: registrar(forPlugin: "io.flutter.plugins.pathprovider"))
}The method should look something like this:
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication
.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
BackgroundLocatorPlugin.setPluginRegistrantCallback(registerPlugins)
registerOtherPlugins()
return super
.application(application,
didFinishLaunchingWithOptions: launchOptions)
}
func registerOtherPlugins() {
if !hasPlugin("io.flutter.plugins.pathprovider") {
FLTPathProviderPlugin
.register(with: registrar(forPlugin: "io.flutter.plugins.pathprovider"))
}
}