ソースを参照

tvOS linking fix

Felix Paul Kühne 7 年 前
コミット
0a60fc4311
1 ファイル変更8 行追加4 行削除
  1. 8 4
      Sources/VLCDialogProvider.m

+ 8 - 4
Sources/VLCDialogProvider.m

@@ -39,11 +39,15 @@
     if (customUI)
         return [[VLCCustomDialogProvider alloc] initWithLibrary:library];
 
-    if ([UIAlertController class]) {
+    #if !TARGET_OS_TV
+        if ([UIAlertController class]) {
+            return [[VLCEmbeddedDialogProvider alloc] initWithLibrary:library];
+        } else {
+            return [[VLCiOSLegacyDialogProvider alloc] initWithLibrary:library];
+        }
+    #else
         return [[VLCEmbeddedDialogProvider alloc] initWithLibrary:library];
-    } else {
-        return [[VLCiOSLegacyDialogProvider alloc] initWithLibrary:library];
-    }
+    #endif
 #else
     if (customUI) {
         return [[VLCCustomDialogProvider alloc] initWithLibrary:library];