SceneDelegateDispatcher
public class SceneDelegateDispatcher : EventDispatching
Use this class to broadcast your UISceneDelegate’s methods among the registered components.
-
Returns a dictionary that maps
persistentIdentifier
ofUIScene
‘s session to theSceneDelegateObserving
instance associated with it.Declaration
Swift
public static func getObservers() -> [String : SceneDelegateObserving]
-
Returns the
SceneDelegateObserving
instance associated with the givenpersistentIdentifier
ofUIScene
‘s sessionDeclaration
Swift
public static func getObserver(scene sessionID: String) -> SceneDelegateObserving?
Parameters
sessionID
persistentIdentifier
ofUISceneSession
ofUIScene
Return Value
Stored
SceneDelegateObserving
correponding tosessionID
-
Asks the delegate to open one or more URLs. This method passes one or more
UIOpenURLContext
objects. Each object contains one URL to open and any additional information needed to open that URL.Declaration
Swift
public static func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
-
Informs the delegate about the addition of a scene to the app. Also used to handle the Universal Links. If your app has opted into Scenes, and your app is not running, the system delivers the universal link to the scene(_:willConnectTo:options:) delegate method after launch. You can get additional configuration from
connectionOptions
parameter.Declaration
Swift
public static func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)
-
Use this method to update the specified scene with the data from the provided activity object. One of the use cases of this method is Universal links. This method is called when the application is running or suspended and the universal link is tapped.
Declaration
Swift
public static func scene(_ scene: UIScene, continue userActivity: NSUserActivity)
-
Called when
UIKit
removed a scene from the app. This method identifies if disconnectedUIScene
is the scene which is associated with Onboarding. Subsequently, It updates the Onboarding Scene and then notifies the observers.Declaration
Swift
public static func sceneDidDisconnect(_ scene: UIScene)
Parameters
scene
UIScene
which did disconnect from the application. -
Undocumented
Declaration
Swift
public static func sceneWillEnterForeground(_ scene: UIScene)
-
Undocumented
Declaration
Swift
public static func sceneDidEnterBackground(_ scene: UIScene)
-
Registers an observer. The registered observer will be called as if it were the SceneDelegate. The call order depends on the registration order. If a delegate method has a return type, then the iteration happens until one of the observers return a non-default value.
Declaration
Swift
public static func register(scene sessionID: String? = nil, _ observer: SceneDelegateObserving)
-
Unregister an observer.
Declaration
Swift
public static func unregister(_ observer: SceneDelegateObserving)
-
Declaration
Swift
public func registerObserver(_ observer: EventObserving)
-
Declaration
Swift
public func unregisterObserver(_ observer: EventObserving)