From 6be801420ccc31a35f7edb43352760dd236b5d2e Mon Sep 17 00:00:00 2001 From: James Magahern Date: Tue, 11 Oct 2022 15:04:37 -0700 Subject: [PATCH] iOS 16 API updates --- App/Browser View/BrowserViewController.swift | 2 +- App/Web Process Bundle Bridge/SBRProcessBundleBridge.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/App/Browser View/BrowserViewController.swift b/App/Browser View/BrowserViewController.swift index b0871b4..ee65977 100644 --- a/App/Browser View/BrowserViewController.swift +++ b/App/Browser View/BrowserViewController.swift @@ -270,7 +270,7 @@ class BrowserViewController: UIViewController if FindOnPageViewController.isEnabled() { browserView.setFindOnPageVisible(true, animated: true) } else if #available(iOS 16.0, *) { - browserView.webView?._findInteraction.presentFindNavigatorShowingReplace(false) + browserView.webView?.findInteraction?.presentFindNavigator(showingReplace: false) } }), for: .touchUpInside) diff --git a/App/Web Process Bundle Bridge/SBRProcessBundleBridge.m b/App/Web Process Bundle Bridge/SBRProcessBundleBridge.m index 894a545..235a33b 100644 --- a/App/Web Process Bundle Bridge/SBRProcessBundleBridge.m +++ b/App/Web Process Bundle Bridge/SBRProcessBundleBridge.m @@ -113,8 +113,8 @@ // Instantiate web view WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:webViewConfiguration]; - if ([webView respondsToSelector:@selector(_setFindInteractionEnabled:)]) { - webView._findInteractionEnabled = YES; + if (@available(iOS 16.0, *)) { + webView.findInteractionEnabled = YES; } // Configure proxy interface (interface to remote web process)