From 0f4629f52bac2087799af90bd50bedf1f1a9e21c Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Tue, 12 May 2026 21:32:12 +0200 Subject: [PATCH] fix(tvos): explicitly link AVKit for avDisplayManager category --- ios/Runner/MpvPlayer/MpvPlayerCore.swift | 3 +++ tvos/Flutter/Debug.xcconfig | 5 +++++ tvos/Flutter/Release.xcconfig | 5 +++++ 3 files changed, 13 insertions(+) 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