diff --git a/App/Browser View/BrowserViewController.swift b/App/Browser View/BrowserViewController.swift index b66e192..8c48f8c 100644 --- a/App/Browser View/BrowserViewController.swift +++ b/App/Browser View/BrowserViewController.swift @@ -296,6 +296,11 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat iconView.someScriptsAllowed = scriptsAllowedForHost iconView.setBlockedScriptsNumber(numBlockedScripts) } + + public func createNewTab(withURL url: URL?) { + let newTab = tabController.createNewTab(url: url) + self.tab = newTab + } // MARK: UIPopoverPresentationControllerDelegate @@ -520,8 +525,7 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat } func createTab(_ sender: Any?) { - let newTab = tabController.createNewTab(url: nil) - self.tab = newTab + createNewTab(withURL: nil) } func previousTab(_ sender: Any?) { diff --git a/App/SceneDelegate.swift b/App/SceneDelegate.swift index d7e0ace..c60edac 100644 --- a/App/SceneDelegate.swift +++ b/App/SceneDelegate.swift @@ -24,10 +24,22 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window.makeKeyAndVisible() self.window = window + if let urlContext = connectionOptions.urlContexts.first { + let url = urlContext.url + browserViewController.tab.beginLoadingURL(url) + } + #if targetEnvironment(macCatalyst) windowScene.titlebar?.titleVisibility = .hidden windowScene.titlebar?.separatorStyle = .none #endif } + + func scene(_ scene: UIScene, openURLContexts URLContexts: Set) + { + for urlContext in URLContexts { + browserViewController.createNewTab(withURL: urlContext.url) + } + } } diff --git a/App/Supporting Files/Info.plist b/App/Supporting Files/Info.plist index bfb4c5f..e297488 100644 --- a/App/Supporting Files/Info.plist +++ b/App/Supporting Files/Info.plist @@ -18,6 +18,20 @@ $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 + CFBundleURLTypes + + + CFBundleTypeRole + Viewer + CFBundleURLName + net.buzzert.rosslerattix + CFBundleURLSchemes + + http + https + + + CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/App/Supporting Files/SBrowser.entitlements b/App/Supporting Files/SBrowser.entitlements index ee95ab7..f033e7a 100644 --- a/App/Supporting Files/SBrowser.entitlements +++ b/App/Supporting Files/SBrowser.entitlements @@ -6,5 +6,7 @@ com.apple.security.network.client + com.apple.developer.web-browser +