@@ -4,14 +4,14 @@ import MobileCoreServices
44import Photos
55
66@main
7- @objc class AppDelegate : FlutterAppDelegate {
8- override func application (
9- _ application : UIApplication ,
10- didFinishLaunchingWithOptions launchOptions : [ UIApplication . LaunchOptionsKey : Any ] ?
11- ) -> Bool {
12- let controller : FlutterViewController = window ? . rootViewController as! FlutterViewController
7+ @objc class AppDelegate : FlutterAppDelegate , FlutterImplicitEngineDelegate {
8+
9+ // 🎵 Morning Dew - Single - AryaMusic Records & ciaffa
10+ // https://music.apple.com/cn/album/morning-dew/1686069386?i=1686069387
11+ func didInitializeImplicitFlutterEngine ( _ engineBridge : FlutterImplicitEngineBridge ) {
12+ GeneratedPluginRegistrant . register ( with : engineBridge . pluginRegistry )
1313 let batteryChannel = FlutterMethodChannel ( name: " samples.flutter.dev/battery " ,
14- binaryMessenger: controller . binaryMessenger )
14+ binaryMessenger: engineBridge . applicationRegistrar . messenger ( ) )
1515 batteryChannel. setMethodCallHandler ( {
1616 ( call: FlutterMethodCall , result: @escaping FlutterResult ) -> Void in
1717 guard call. method == " getBatteryLevel " else {
@@ -26,9 +26,14 @@ import Photos
2626 self . receiveBatteryLevel ( result: result, path: path , delay: delay)
2727
2828 } )
29- DocumentPlugin . bind ( controller: controller)
30- GeneratedPluginRegistrant . register ( with: self )
31- DeepLinkPlugin . register ( with: self . registrar ( forPlugin: " DeepLinkPlugin " ) !)
29+ DocumentPlugin . bind ( engineBridge)
30+ DeepLinkPlugin . register ( with: engineBridge. pluginRegistry. registrar ( forPlugin: " DeepLinkPlugin " ) !)
31+ }
32+
33+ override func application(
34+ _ application: UIApplication ,
35+ didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ?
36+ ) -> Bool {
3237 return super. application ( application, didFinishLaunchingWithOptions: launchOptions)
3338 }
3439
@@ -146,8 +151,8 @@ import Photos
146151 func saveGifToDocument( imageArray images: NSArray , _ gifPath: String , delay: Int ) -> Bool {
147152 guard images. count > 0 &&
148153 gifPath. utf8CString. count > 0 else {
149- return false
150- }
154+ return false
155+ }
151156
152157 let url = CFURLCreateWithFileSystemPath ( kCFAllocatorDefault, gifPath as CFString , . cfurlposixPathStyle, false )
153158 let destion = CGImageDestinationCreateWithURL ( url!, kUTTypeGIF, images. count, nil )
0 commit comments