0

I have integrated AppLovin in AdMOb mediation. And followed all the steps mentioned in AppLovin docs.

When I run the application to show AppLovin videos with below code,

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];
}

I am getting below exception,

[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:

I tried adding -ObjC -all_load to other linker flags but still i get same exception.

Please let me know if any one know whats wrong here.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Avaan
  • 4,709
  • 1
  • 10
  • 13

2 Answers2

1

Finally I fixed the issue.

I need to use below code instead of above code(as mentioned in question)

//Initialize

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

//To show add

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

After above changes I started getting the AppLovin videos.

For more details check link https://developers.google.com/admob/ios/rewarded-video#request_rewarded_video

Avaan
  • 4,709
  • 1
  • 10
  • 13
0

Can you verify that you've added our most recent AdMob adapters to your project? It looks like you're trying to use interstitials but getting a rewarded video error. Did you configure a rewarded video ad unit in your AdMob dashboard instead of an interstitial by mistake or vice versa?

Feel free to contact us at support@applovin.com for further assistance.

josh
  • 51
  • 4