diff --git a/ios/Runner/MpvPlayer/MpvPlayerCore.swift b/ios/Runner/MpvPlayer/MpvPlayerCore.swift index 99215d58..7b4295f1 100644 --- a/ios/Runner/MpvPlayer/MpvPlayerCore.swift +++ b/ios/Runner/MpvPlayer/MpvPlayerCore.swift @@ -1,4 +1,7 @@ import AVFoundation +#if os(tvOS) + import AVKit +#endif import QuartzCore import UIKit diff --git a/tvos/Flutter/Debug.xcconfig b/tvos/Flutter/Debug.xcconfig index ec97fc6f..0a11a306 100644 --- a/tvos/Flutter/Debug.xcconfig +++ b/tvos/Flutter/Debug.xcconfig @@ -1,2 +1,7 @@ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" + +// AVKit owns UIWindow.avDisplayManager (used for native Dolby Vision +// trigger). Swift autolink doesn't reliably emit -framework AVKit for +// ObjC category access, so link it explicitly. +OTHER_LDFLAGS = $(inherited) -framework AVKit diff --git a/tvos/Flutter/Release.xcconfig b/tvos/Flutter/Release.xcconfig index c4855bfe..fc9aa926 100644 --- a/tvos/Flutter/Release.xcconfig +++ b/tvos/Flutter/Release.xcconfig @@ -1,2 +1,7 @@ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" + +// AVKit owns UIWindow.avDisplayManager (used for native Dolby Vision +// trigger). Swift autolink doesn't reliably emit -framework AVKit for +// ObjC category access, so link it explicitly. +OTHER_LDFLAGS = $(inherited) -framework AVKit