Skip to content

Instantly share code, notes, and snippets.

@ArchieR7
Created June 26, 2017 02:20
Show Gist options
  • Select an option

  • Save ArchieR7/33ad9ce7d1c7570e047e7f40e94b91cf to your computer and use it in GitHub Desktop.

Select an option

Save ArchieR7/33ad9ce7d1c7570e047e7f40e94b91cf to your computer and use it in GitHub Desktop.
AdMob Reward based video ad delegate
func rewardBasedVideoAd(_ rewardBasedVideoAd: GADRewardBasedVideoAd, didRewardUserWith reward: GADAdReward) {
//give user reward
}
func rewardBasedVideoAd(_ rewardBasedVideoAd: GADRewardBasedVideoAd, didFailToLoadWithError error: Error) {
print("Reward based video ad failed to load: \(error.localizedDescription)")
}
func rewardBasedVideoAdDidReceive(_ rewardBasedVideoAd: GADRewardBasedVideoAd) {
print("Reward based video ad is received.")
}
func rewardBasedVideoAdDidOpen(_ rewardBasedVideoAd: GADRewardBasedVideoAd) {
print("Opened reward based video ad.")
}
func rewardBasedVideoAdDidStartPlaying(_ rewardBasedVideoAd: GADRewardBasedVideoAd) {
print("Reward based video ad started playing.")
}
func rewardBasedVideoAdDidClose(_ rewardBasedVideoAd: GADRewardBasedVideoAd) {
print("Reward based video ad is closed.")
}
func rewardBasedVideoAdWillLeaveApplication(_ rewardBasedVideoAd: GADRewardBasedVideoAd) {
print("Reward based video ad will leave application.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment