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