handle launching to articles from a cold start

This commit is contained in:
Stuart Breckenridge 2020-11-19 15:52:43 +08:00
parent 1bdfb3aafc
commit 3e69571d09
1 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
window!.tintColor = AppAssets.primaryAccentColor window!.tintColor = AppAssets.primaryAccentColor
updateUserInterfaceStyle() updateUserInterfaceStyle()
window!.rootViewController = coordinator.start(for: window!.frame.size) window!.rootViewController = coordinator.start(for: window!.frame.size)
coordinator.restoreWindowState(session.stateRestorationActivity) coordinator.restoreWindowState(session.stateRestorationActivity)
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil)
@ -44,6 +44,10 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
coordinator.handle(userActivity) coordinator.handle(userActivity)
} }
if let _ = connectionOptions.urlContexts.first {
self.scene(scene, openURLContexts: connectionOptions.urlContexts)
}
window!.makeKeyAndVisible() window!.makeKeyAndVisible()
} }