diff --git a/ios/Capacitor/Capacitor/CAPBridge.swift b/ios/Capacitor/Capacitor/CAPBridge.swift index efb2f0c4b..bc4a60dfa 100644 --- a/ios/Capacitor/Capacitor/CAPBridge.swift +++ b/ios/Capacitor/Capacitor/CAPBridge.swift @@ -176,7 +176,7 @@ enum BridgeError: Error { self.isActive = true appStatePlugin?.fireChange(isActive: self.isActive) } - NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: OperationQueue.main) { (notification) in + NotificationCenter.default.addObserver(forName: UIApplication.willResignActiveNotification, object: nil, queue: OperationQueue.main) { (notification) in CAPLog.print("APP INACTIVE") self.isActive = false appStatePlugin?.fireChange(isActive: self.isActive)