我已将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 - IOS 9.3应用中的AdLob(V7.7.1)中介异常的AppLovin初始化,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36745556/