Created
July 18, 2024 10:02
-
-
Save mdjastrzebski/c928c6e1149138070bc138642e1663f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Flutter | |
import React | |
import UIKit | |
@UIApplicationMain | |
@objc class AppDelegate: FlutterAppDelegate { | |
override func application( | |
_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | |
) -> Bool { | |
// ... | |
GeneratedPluginRegistrant.register(with: self) | |
// Register FLReactViewFactory with Flutter engine. | |
// See: https://docs.flutter.dev/platform-integration/ios/platform-views | |
guard let pluginRegistrar = self.registrar(forPlugin: "plugin-name") else { | |
return false | |
} | |
pluginRegistrar.register( | |
FLReactViewFactory(messenger: pluginRegistrar.messenger()), | |
withId: "react_view" | |
) | |
BridgeManager.shared.loadReactNative(launchOptions: launchOptions) | |
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment