我知道这种问题被问了很多,但我已经尝试了所有的方法,但找不到发生了什么。
我没有使用中介,而且显示插页式广告也没有问题。这是我的配置:
class MainContainerViewController: UIViewController, GADInterstitialDelegate, GADRewardBasedVideoAdDelegate {
var rewardBasedVideo: GADRewardBasedVideoAd?
override func viewDidLoad() {
super.viewDidLoad()
...
rewardBasedVideo = GADRewardBasedVideoAd.sharedInstance()
rewardBasedVideo?.delegate = self
let request = GADRequest()
request.testDevices = ["b8d6d8f423b67dc1855d953466503d0d"]
rewardBasedVideo?.load(request, withAdUnitID: "ca-app-pub-3872067921404234/2000937302")
}
func rewardBasedVideoAd(_ rewardBasedVideoAd: GADRewardBasedVideoAd, didFailToLoadWithError error: Error) {
NSLog("didFailToLoad \(error.localizedDescription)")
}
}
我尝试加载 AdUnitID 进行测试但没有成功,并且每次尝试加载新的奖励视频时的日志都显示:
<Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.
didFailToLoad No ad returned from any ad server.
任何帮助都会很棒。提前致谢,
//编辑
它可能与设备尺寸有关吗?我已经在模拟器上进行了测试,它工作正常,但在 iPhone 7plus 上,结果是上面显示的。任何人都可以证实这一点???