gpt4 book ai didi

ios - AppLovin init with AdMob(V7.7.1) Mediation exception in IOS 9.3 app

转载 作者:行者123 更新时间:2023-11-29 01:03:19 28 4
gpt4 key购买 nike

我已将 AppLovin 集成到 AdMOb 中介中。并遵循 AppLovin 文档中提到的所有步骤。

当我运行应用程序以使用以下代码显示 AppLovin 视频时,

GADInterstitial* interstitialVideo = [[GADInterstitial alloc] initWithAdUnitID:@"ca-app-pub-xxxxxxxxxxxx"];
interstitialVideo.delegate = self;
GADRequest *request = [GADRequest request];
// Requests test ads on test devices.
request.testDevices = @[ testDeview ];
[interstitialVideo loadRequest:request];

if ([interstitialVideo isReady]) {
[interstitialVideo presentFromRootViewController:self];
}

我低于异常,

[2604:1732410] -[GADMAdapterAppLovinRewardBasedVideoAd initWithGADMAdNetworkConnector:]: unrecognized selector sent to instance 0x1283d7570
2016-04-20 16:14:32.100 [2604:1732410] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADMAdapterAppLovinRewardBasedVideoAd initWithGADMAdNetworkConnector:]: unrecognized selector sent to instance 0x1283d7570'
** First throw call stack:

我尝试将 -ObjC -all_load 添加到其他链接器标志,但我仍然遇到相同的异常。

如果有人知道这里有什么问题,请告诉我。

最佳答案

最后我解决了这个问题。

我需要使用下面的代码而不是上面的代码(如问题所述)

//初始化

[GADRewardBasedVideoAd sharedInstance].delegate = self;
[[GADRewardBasedVideoAd sharedInstance] loadRequest:[GADRequest request]
withAdUnitID:@"ca-app-pub-xxxxxxxxxxxx"];

//显示添加

if ([[GADRewardBasedVideoAd sharedInstance] isReady]) {
[[GADRewardBasedVideoAd sharedInstance] presentFromRootViewController:self];
}

经过上述更改后,我开始获取 AppLovin 视频。

有关更多详细信息,请查看链接 https://developers.google.com/admob/ios/rewarded-video#request_rewarded_video

关于ios - AppLovin init with AdMob(V7.7.1) Mediation exception in IOS 9.3 app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36745556/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com