diff --git a/Sources/GreenAlert/UIAlertController+Extensions.swift b/Sources/GreenAlert/UIAlertController+Extensions.swift index 0172cc5..ebe9d29 100644 --- a/Sources/GreenAlert/UIAlertController+Extensions.swift +++ b/Sources/GreenAlert/UIAlertController+Extensions.swift @@ -240,22 +240,7 @@ public extension UIAlertController { } } -// TODO: either import EZSE or migrate away -public extension UIApplication { - /// EZSE: Run a block in background after app resigns activity - func runInBackground(_ closure: @escaping () -> Void, expirationHandler: (() -> Void)? = nil) { - DispatchQueue.main.async { - let taskID: UIBackgroundTaskIdentifier - if let expirationHandler = expirationHandler { - taskID = self.beginBackgroundTask(expirationHandler: expirationHandler) - } else { - taskID = self.beginBackgroundTask(expirationHandler: { }) - } - closure() - self.endBackgroundTask(taskID) - } - } - +fileprivate extension UIApplication { /// EZSE: Get the top most view controller from the base view controller; default param is UIWindow's rootViewController class func topViewController(_ base: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController? { if let nav = base as? UINavigationController {