-
Notifications
You must be signed in to change notification settings - Fork 350
Use other plugins in callback
mehdi sohrabi edited this page Jul 18, 2021
·
4 revisions
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"))
}
}