diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 432d1012..0fe76503 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -3,18 +3,11 @@ import UIKit import AVFoundation @main -@objc class AppDelegate: FlutterAppDelegate { +@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - - // Register MPV player plugin - if let registrar = self.registrar(forPlugin: "MpvPlayerPlugin") { - MpvPlayerPlugin.register(with: registrar) - } - // Configure audio session for media playback do { let session = AVAudioSession.sharedInstance() @@ -28,4 +21,13 @@ import AVFoundation return super.application(application, didFinishLaunchingWithOptions: launchOptions) } + + func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { + GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) + + // Register MPV player plugin + if let registrar = engineBridge.pluginRegistry.registrar(forPlugin: "MpvPlayerPlugin") { + MpvPlayerPlugin.register(with: registrar) + } + } } diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 1a4bbea0..dfe4135b 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -66,5 +66,26 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneClassName + UIWindowScene + UISceneDelegateClassName + FlutterSceneDelegate + UISceneConfigurationName + flutter + UISceneStoryboardFile + Main + + + +