From e86faa2f4520f63c540afb03a4ff76b35f65dffa Mon Sep 17 00:00:00 2001 From: Max Katz Date: Sat, 20 Jan 2024 01:28:19 -0800 Subject: [PATCH] Don't use WebKit on tvOS samples --- samples/ControlCatalog.iOS/EmbedSample.iOS.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/ControlCatalog.iOS/EmbedSample.iOS.cs b/samples/ControlCatalog.iOS/EmbedSample.iOS.cs index ad86d2b578..8fe72d1cff 100644 --- a/samples/ControlCatalog.iOS/EmbedSample.iOS.cs +++ b/samples/ControlCatalog.iOS/EmbedSample.iOS.cs @@ -3,7 +3,6 @@ using Avalonia.Platform; using CoreGraphics; using Foundation; using UIKit; -using WebKit; using Avalonia.iOS; using ControlCatalog.Pages; @@ -13,14 +12,16 @@ public class EmbedSampleIOS : INativeDemoControl { public IPlatformHandle CreateControl(bool isSecond, IPlatformHandle parent, Func createDefault) { +#if !TVOS if (isSecond) { - var webView = new WKWebView(CGRect.Empty, new WKWebViewConfiguration()); + var webView = new WebKit.WKWebView(CGRect.Empty, new WebKit.WKWebViewConfiguration()); webView.LoadRequest(new NSUrlRequest(new NSUrl("https://www.apple.com/"))); return new UIViewControlHandle(webView); } else +#endif { var button = new UIButton(); var clickCount = 0;