let adMobRewardBasedVideoAdUnitId = "ca-app-pub-3940256099942544/1712485313" // Google Test AD ID
let adMobInterstitialAdUnitId = "ca-app-pub-3940256099942544/5135589807"
fileprivate var rewardBasedVideo: GADRewardBasedVideoAd?
fileprivate var interstitial: GADInterstitial!
func createAndLoadInterstitial() {
interstitial = GADInterstitial(adUnitID: adMobInterstitialAdUnitId)
interstitial.delegate = self
let request = GADRequest()
request.testDevices = [ adMobMyDeviceUUID ]
interstitial.load(request)
}
func createAndLoadRewardBasedVideoAd() {
rewardBasedVideo = GADRewardBasedVideoAd.sharedInstance()
rewardBasedVideo?.delegate = self
let request = GADRequest()
request.testDevices = [ adMobMyDeviceUUID ]
if !rewardBasedVideoAdRequestInProgress && rewardBasedVideo?.isReady == false {
rewardBasedVideo?.load(request, withAdUnitID: adMobRewardBasedVideoAdUnitId)
rewardBasedVideoAdRequestInProgress = true
}
}
HiI can get test devices working for banner & Interstitial ads, but not for reward videos.. How does it work for apps that just what reward videosbelow is the code for both interstitial and reward , but if I call Interstitial and then reward , no error , but reward by itself errors with "<Google> To get test ads on this device, call: request.testDevices = @"
func createAndLoadInterstitial() {
interstitial = GADInterstitial(adUnitID: adMobInterstitialAdUnitId)
interstitial.delegate = self
let request = GADRequest()
request.testDevices = [ adMobMyDeviceUUID ]
interstitial.load(request)
}
func createAndLoadRewardBasedVideoAd() {
rewardBasedVideo = GADRewardBasedVideoAd.sharedInstance()
rewardBasedVideo?.delegate = self
let request = GADRequest()
request.testDevices = [ adMobMyDeviceUUID ]
if !rewardBasedVideoAdRequestInProgress && rewardBasedVideo?.isReady == false {
rewardBasedVideo?.load(request, withAdUnitID: adMobRewardBasedVideoAdUnitId)
rewardBasedVideoAdRequestInProgress = true
}
}
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/632f5e70-9a5a-42de-a8a8-5a17c5f4e8ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/632f5e70-9a5a-42de-a8a8-5a17c5f4e8ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/374a5948-7900-4fc7-bf37-2ab5dd795f5a%40googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/93c5c4ba-f439-4ce1-bd78-13189d332156%40googlegroups.com.