π₯οΈRewarded-Interstitial Ad
extension RewardedInterstitialAdManager: MediationAdDelegate {
func onRewardedInterstitialAdLoaded(rewardedInterstitialAd: any MediationRewardedInterstitialAd) {
rewardedInterstitialAd.presentRewardedInterstitial(from: self)
rewardedInterstitialAd.eventDelegate = self
}
func onAdFailedToLoad(error: AdError) {
print("RewardedInterstitialAd Ad request failed with reason \(error.description)")
}
}extension RewardedInterstitialAdManager: MediationRewardedInterstitialAdEventDelegate {
func recordRewardedInterstitialClick() {
print("Rewarded interstitial clicked")
}
func recordRewardedInterstitialImpression() {
print("Rewarded interstitial impression recorded")
}
func didRewardUser(reward: AdsFramework.AdReward) {
print("User rewarded: \(reward.amount) \(reward.type)")
}
}Last updated