Skip to content

Commit

Permalink
fix(ios): `Application tried to present modally a view controller <UI…
Browse files Browse the repository at this point in the history
…ViewController: 0x10392e710> that is already being presented by ...` exception
  • Loading branch information
micbis authored Aug 9, 2024
1 parent ed166f2 commit 54205fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Plugin/PrivacyScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 54205fe

Please sign in to comment.