I have recently upgraded to Google Mobile Ads v8. In my App, I have two Interstitial ads in the same ViewController that get displayed at unique interactions. Because of this, I need to be able to determine which Interstitial ad was dismissed in adDidDismissFullScreenContent so I can advance the UI accordingly.
Right now I am only determining if it was an Interstitial ad that was dismissed.
func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) {
if type(of: ad) == GADInterstitialAd.self {
// Interstitial was dismissed
}
}
Ideally, I would like to be able to determine which ad was dismissed by adUnitID (if that is even possible).
Something like this:
func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) {
if ad.adUnitID = "Ad1"{
// Do something.
} else if ad.adUnitID = "Ad2"{
// Do something else.
}
}
How can I determine which interstitial ad was dismissed using Google Mobile Ads v8?