From e702542fa4c3bbc9dac446736b793db4aadd306a Mon Sep 17 00:00:00 2001 From: Soner Yuksel Date: Mon, 3 Jun 2024 13:40:10 -0400 Subject: [PATCH] Formatting for the context --- ios/brave-ios/App/iOS/Delegates/SceneDelegate.swift | 6 ++++-- .../BrowserViewController/BrowserViewController.swift | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ios/brave-ios/App/iOS/Delegates/SceneDelegate.swift b/ios/brave-ios/App/iOS/Delegates/SceneDelegate.swift index d4d3d85e7004..f705b15e36a2 100644 --- a/ios/brave-ios/App/iOS/Delegates/SceneDelegate.swift +++ b/ios/brave-ios/App/iOS/Delegates/SceneDelegate.swift @@ -317,11 +317,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { return } - if case .url(let navigationPathURL, _) = routerpath, let pathURL = navigationPathURL, pathURL.isFileURL { + if case .url(let navigationPathURL, _) = routerpath, let pathURL = navigationPathURL, + pathURL.isFileURL + { defer { pathURL.stopAccessingSecurityScopedResource() } - + let canAccessFileURL = pathURL.startAccessingSecurityScopedResource() if !canAccessFileURL { diff --git a/ios/brave-ios/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController.swift b/ios/brave-ios/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController.swift index fbac3fb1bdca..eee60b924eea 100644 --- a/ios/brave-ios/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController.swift +++ b/ios/brave-ios/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController.swift @@ -3455,7 +3455,7 @@ extension BrowserViewController { NavigationPath.handle(nav: path, with: self) } } - + public func submitSearchText(_ text: String, isBraveSearchPromotion: Bool = false) { var engine = profile.searchEngines.defaultEngine( forType: privateBrowsingManager.isPrivateBrowsing ? .privateMode : .standard