diff --git a/ios/Plugin/PrivacyScreen.swift b/ios/Plugin/PrivacyScreen.swift index 0453db2..0e704da 100644 --- a/ios/Plugin/PrivacyScreen.swift +++ b/ios/Plugin/PrivacyScreen.swift @@ -64,7 +64,7 @@ import UIKit let window = UIApplication.shared.connectedScenes .filter({$0.activationState == .foregroundActive || $0.activationState == .foregroundInactive}) .compactMap({$0 as? UIWindowScene}).first?.windows.filter({$0.isKeyWindow}).first - if var rootVC = window?.rootViewController { + if var rootVC = window?.rootViewController, !self.privacyViewController.isBeingPresented { while let topVC = rootVC.presentedViewController { rootVC = topVC }