Skip to content

Commit

Permalink
fix(ios): `application tried to present modal view controller on itse…
Browse files Browse the repository at this point in the history
…lf` (#98)
  • Loading branch information
micbis authored Jul 17, 2024
1 parent 835529e commit 28b3d51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ios/Plugin/PrivacyScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ import UIKit
while let topVC = rootVC.presentedViewController {
rootVC = topVC
}
rootVC.present(self.privacyViewController, animated: false, completion: nil)
if rootVC.presentedViewController != self.privacyViewController {
rootVC.present(self.privacyViewController, animated: false, completion: nil)
}
} else {
self.plugin.bridge?.viewController?.present(self.privacyViewController, animated: false, completion: nil)
if self.plugin.bridge?.viewController?.presentedViewController != self.privacyViewController {
self.plugin.bridge?.viewController?.present(self.privacyViewController, animated: false, completion: nil)
}
}
}
}
Expand Down

0 comments on commit 28b3d51

Please sign in to comment.