AirshipWindowFactory

@MainActor
public final class AirshipWindowFactory

A singleton factory class to create and configure UIWindow objects. This allows apps to override behaviors like dark mode and other window-specific settings.

  • The shared instance of AirshipWindowFactory for centralized window creation.

    Declaration

    Swift

    @MainActor
    public static let shared: AirshipWindowFactory
  • A closure that allows apps to customize window creation. If nil, the default window creation behavior will be used.

    Declaration

    Swift

    @MainActor
    public var makeBlock: (@MainActor @Sendable (UIWindowScene) -> UIWindow)?
  • Creates a new UIWindow for the given window scene.

    Declaration

    Swift

    @MainActor
    public func makeWindow(windowScene: UIWindowScene) -> UIWindow

    Parameters

    windowScene

    The UIWindowScene in which the new window will be created.

    Return Value

    A UIWindow object configured for the given UIWindowScene.