diff --git a/app/ios/Runner/AppDelegate.swift b/app/ios/Runner/AppDelegate.swift index 61fa59bc8..718ff9f73 100644 --- a/app/ios/Runner/AppDelegate.swift +++ b/app/ios/Runner/AppDelegate.swift @@ -4,13 +4,18 @@ import Flutter @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } + override func application( _ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { - // This line is not in the flutter_sharing_intent tutorial but was here - // before - GeneratedPluginRegistrant.register(with: self) let sharingIntent = SwiftFlutterSharingIntentPlugin.instance // if the url is made from SwiftFlutterSharingIntentPlugin then handle it // with plugin [SwiftFlutterSharingIntentPlugin] @@ -18,6 +23,6 @@ import Flutter return sharingIntent.application(app, open: url, options: options) } // Proceed url handling for other Flutter libraries like uni_links - return super.application(app, open: url, options:options) + return super.application(app, open: url, options: options) } -} +} \ No newline at end of file