Open AlexanderUsselmann opened 4 years ago
So for those who couldn't solve this, running on C not swift, your AppDelegate.m
@implementation AppDelegate
void registerPlugins(NSObject
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self]; [FlutterDownloaderPlugin setPluginRegistrantCallback:registerPlugins]; // Override point for customization after application launch. return [super application:application didFinishLaunchingWithOptions:launchOptions]; }
@end
copy that and paste it
To be clear, geofencing ^0.0.1 is not up to date with this repository. I wasn't intending on officially publishing this plugin as the Flutter plugins team didn't have the bandwidth to support it, so it appears that some individuals decided to publish it themselves. If you want to use this plugin as-is, your best bet is to pull it in with a local copy or a git dependency in your pubspec.yaml.
Is this plugin using Flutter downloader plugin?
I got same error and resoled the crash by following code
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
GeofencingPlugin.setPluginRegistrantCallback({_ in
})
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
Running the example code in IOS result in a crash on startup with the following error message:
flutter: Initializing..
*** Assertion failure in -[GeofencingPlugin startGeofencingService:], /Users/xxx/flutter/.pub-cache/hosted/pub.dartlang.org/geofencing-0.0.1/ios/Classes/GeofencingPlugin.m:164
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'failed to set registerPlugins'
using pubspec.yaml entry:
I would be very pleased about some help or a idea for a possible solution