From c6d0ce0f5f1fc7fb60ffd774754c710b92536ea6 Mon Sep 17 00:00:00 2001 From: Tierra Cero Date: Sun, 5 Dec 2021 17:03:18 -0600 Subject: [PATCH 1/2] Update To _SceneDelegate.swift func scene(_ scene: UIScene, openURLContexts URLContexts: Set) is necessary for Lifecycle.openURL(_ handler: @escaping (_ url: URL, _ sourceApplication: String?, _ annotation: Any) -> Bool) -> Self to work properly --- Classes/Controllers/BaseApp/_SceneDelegate.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Classes/Controllers/BaseApp/_SceneDelegate.swift b/Classes/Controllers/BaseApp/_SceneDelegate.swift index c11f055c..670a5624 100644 --- a/Classes/Controllers/BaseApp/_SceneDelegate.swift +++ b/Classes/Controllers/BaseApp/_SceneDelegate.swift @@ -60,6 +60,17 @@ class _SceneDelegate: UIResponder, UIWindowSceneDelegate { // to restore the scene back to its current state. } + func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { + guard let url = URLContexts.first?.url else { + return + } + let _ = BaseApp.shared.lifecycle?._openURLSourceAppAnnotation?( + url, + nil, + [UIApplication.OpenURLOptionsKey.annotation] + ) + } + func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) { BaseApp.shared.shortcuts .first { $0.item.type == shortcutItem.type }? From e2c879e75576c7a363120d1e698b8e2daf08b48f Mon Sep 17 00:00:00 2001 From: Tierra Cero Date: Mon, 1 May 2023 17:00:59 -0600 Subject: [PATCH 2/2] Update _SceneDelegate.swift fixed identation --- .../Controllers/BaseApp/_SceneDelegate.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Classes/Controllers/BaseApp/_SceneDelegate.swift b/Classes/Controllers/BaseApp/_SceneDelegate.swift index 670a5624..bfd7536c 100644 --- a/Classes/Controllers/BaseApp/_SceneDelegate.swift +++ b/Classes/Controllers/BaseApp/_SceneDelegate.swift @@ -61,15 +61,15 @@ class _SceneDelegate: UIResponder, UIWindowSceneDelegate { } func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { - guard let url = URLContexts.first?.url else { - return - } - let _ = BaseApp.shared.lifecycle?._openURLSourceAppAnnotation?( - url, - nil, - [UIApplication.OpenURLOptionsKey.annotation] - ) - } + guard let url = URLContexts.first?.url else { + return + } + let _ = BaseApp.shared.lifecycle?._openURLSourceAppAnnotation?( + url, + nil, + [UIApplication.OpenURLOptionsKey.annotation] + ) + } func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) { BaseApp.shared.shortcuts