Since running the iOS 13 beta I am having issues with my app displaying the interstitial view controller being displayed modally, therefore allowing the user to swipe down to dismiss the ad before the timer counts down.
I understand that modal views are now the default for iOS 13 and I have amended my main view controller to display full screen, however when the ad displays, this is still displayed modally and not full screen.
I have so far tried declaring the view controller, and then requesting it be displayed in full screen, then presenting the ad using the views declaration:
let vc = UIViewController()
vc.modalPresentationStyle = .fullScreen
interstitial.present(fromRootViewController: vc)
if interstitial.isReady {
if #available(iOS 13, *) {
interstitial.present(fromRootViewController: self)
interstitialDidDismissScreen(interstitial)
} else {
interstitial.present(fromRootViewController: self)
interstitialDidDismissScreen(interstitial)
}
Expected result is that the view for the interstitial ad is displayed full screen so that a user cannot swipe down to dismiss the view before the time runs out.
This works fine in iOS 12.
In case anyone else comes across this post, it was a simple solution in my case.
It appears as though Google had updated their framework but I wasn’t using the latest version of it.
Therefore a simple ‘pod update’ in Terminal updated the dependencies which in turn solved the problem.
I am using CocoaPods to manage my frameworks, but I’m sure for those who aren’t can find the best way to update their own dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With