func adWillPresentFullScreenContent(_ ad: GADFullScreenPresentingAd) {
// Get the active window scene
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let keyWindow = windowScene.windows.first(where: { $0.isKeyWindow
}) {
let safeAreaInsets = keyWindow.safeAreaInsets
// Log the safe area insets (Optional: for debugging)
print("Safe Area Insets: Top: \(safeAreaInsets.top), Bottom: \(safeAreaInsets.bottom)")
// Adjust the presenting view controller's frame based on the safe area insets
if let presentingViewController = presentingViewController {
presentingViewController.view.frame = CGRect(x: safeAreaInsets.left,
y: safeAreaInsets.top,
width: view.bounds.width - safeAreaInsets.left - safeAreaInsets.right,
height: view.bounds.height - safeAreaInsets.top - safeAreaInsets.bottom)
}
}
}
Mobile Ads SDK Team |
Hi,
Your issue is still under investigation. Once we receive any updates, we will intimate you. Meanwhile, your patience is important.
Hi,
I will raise this issue with our team regarding this and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.
Mobile Ads SDK Team |