我知道这个问题已经被问了很多但是我已经尝试了所有的东西而无法找到发生的事情。
我没有使用调解,我没有显示插页式广告的麻烦。这是我的配置:
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.
任何帮助都会很棒。提前谢谢,
// EDIT
是否与设备尺寸有关?我已经在模拟器上进行了测试,它运行良好,但在iPhone 7plus上,结果如上所示。任何人都可以证实这个???
答案 0 :(得分:0)
确保正确安装Adapter SDK,Firebase SDK并在BuildPhases中正确链接它们 - &gt;链接二进制文件与库。还要添加文档中提到的搜索路径。该错误表示无法显示广告或您收到错误的广告。我用sample apps检查了您的广告单元ID,一切正常。再次检查您的实现和Pod安装。