Add support for becoming a default browser
This commit is contained in:
@@ -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<UIOpenURLContext>)
|
||||
{
|
||||
for urlContext in URLContexts {
|
||||
browserViewController.createNewTab(withURL: urlContext.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user