Skip to content

Instantly share code, notes, and snippets.

@bkonyi
Created February 19, 2019 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkonyi/856e6c29c3abb359cd1414396a5f2cda to your computer and use it in GitHub Desktop.
Save bkonyi/856e6c29c3abb359cd1414396a5f2cda to your computer and use it in GitHub Desktop.
AppDelegate.m
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
// Add the import for the GeofencingPlugin.
#import <geofencing/GeofencingPlugin.h>
void registerPlugins(NSObject<FlutterPluginRegistry>* registry) {
[GeneratedPluginRegistrant registerWithRegistry:registry];
}
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Register the plugins with the AppDelegate
registerPlugins(self);
// Set registerPlugins as a callback within GeofencingPlugin. This allows
// for the Geofencing plugin to register the plugins with the background
// FlutterEngine instance created to handle events. If this step is skipped,
// other plugins will not work in the geofencing callbacks!
[GeofencingPlugin setPluginRegistrantCallback:registerPlugins];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment