SceneDelegateDispatcher
public class SceneDelegateDispatcher : EventDispatching
Use this class to broadcast your UISceneDelegate’s methods among the registered components.
-
Returns a dictionary that maps
persistentIdentifierofUIScene‘s session to theSceneDelegateObservinginstance associated with it.Declaration
Swift
public static func getObservers() -> [String : SceneDelegateObserving] -
Returns the
SceneDelegateObservinginstance associated with the givenpersistentIdentifierofUIScene‘s sessionDeclaration
Swift
public static func getObserver(scene sessionID: String) -> SceneDelegateObserving?Parameters
sessionIDpersistentIdentifierofUISceneSessionofUISceneReturn Value
Stored
SceneDelegateObservingcorreponding tosessionID -
Asks the delegate to open one or more URLs. This method passes one or more
UIOpenURLContextobjects. 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
connectionOptionsparameter.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
UIKitremoved a scene from the app. This method identifies if disconnectedUISceneis 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
sceneUIScenewhich 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)