From 3e69571d09323981989546290f099493eb17d190 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 19 Nov 2020 15:52:43 +0800 Subject: [PATCH] handle launching to articles from a cold start --- iOS/SceneDelegate.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iOS/SceneDelegate.swift b/iOS/SceneDelegate.swift index 4a5c40cd3..d0ef08e9b 100644 --- a/iOS/SceneDelegate.swift +++ b/iOS/SceneDelegate.swift @@ -23,7 +23,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window!.tintColor = AppAssets.primaryAccentColor updateUserInterfaceStyle() window!.rootViewController = coordinator.start(for: window!.frame.size) - + coordinator.restoreWindowState(session.stateRestorationActivity) NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil) @@ -44,6 +44,10 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { coordinator.handle(userActivity) } + if let _ = connectionOptions.urlContexts.first { + self.scene(scene, openURLContexts: connectionOptions.urlContexts) + } + window!.makeKeyAndVisible() }