初始化

This commit is contained in:
谢宇宁
2026-09-15 15:44:13 +07:00
commit a23ba685e9
1065 changed files with 101122 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import UIKit
import Flutter
import VideoToolbox
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
// H.265 ( com.yinse/device)VTIsHardwareDecodeSupported
// iOS11+ A9(iPhone 6s) true false 264
if let controller = window?.rootViewController as? FlutterViewController {
let channel = FlutterMethodChannel(name: "com.yinse/device", binaryMessenger: controller.binaryMessenger)
channel.setMethodCallHandler { call, result in
if call.method == "isH265HardwareSupported" {
if #available(iOS 11.0, *) {
result(VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC))
} else {
result(false)
}
} else {
result(FlutterMethodNotImplemented)
}
}
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}