diff --git a/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift b/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift index 270fd0c..367045e 100644 --- a/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift +++ b/PluggableApplicationDelegate/Classes/ApplicationServicesManager.swift @@ -13,6 +13,16 @@ import CloudKit /// It doesn't add more functionalities yet. public protocol ApplicationService: UIApplicationDelegate {} +extension ApplicationService { + @nonobjc public var window: UIWindow? { + get { + return UIApplication.shared.delegate?.window ?? nil + } set(newValue) { + (UIApplication.shared.delegate as? PluggableApplicationDelegate)?.window = newValue + } + } +} + open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate { public var window: UIWindow?