onInterstitialAdClosed not firing and shows error in Xcode
See original GitHub issueHello,
I am trying to implement interstitial ads. The ad loading is working perfectly fine and I can see ‘onInterstitialAdLoaded’ is getting fired. The ad showing is also working and I see my test ad pop up. I would like to load a new ad when the ad closed event is fired, however the event does not fire and I see this error in Xcode when I click to close the ad. Any ideas on how I can resolve this? I am testing on an iPhone 12 Pro simulator.
Error:
ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 83552, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}
Code:
loadInterstitialAd() {
AdMob.prepareInterstitial({
adId: this.adInfo.interstitialId
});
AdMob.addListener('onInterstitialAdLoaded', this.onInterstitialAdLoaded);
AdMob.addListener('onInterstitialAdOpened', this.onInterstitialAdOpened);
AdMob.addListener('onInterstitialAdClosed', this.onInterstitialAdClosed);
}
showInterstitialAd() {
AdMob.showInterstitial();
}
private onInterstitialAdLoaded = (info: any) => {
console.log('Ad loaded');
}
private onInterstitialAdOpened = (info: any) => {
console.log('Ad opened');
}
private onInterstitialAdClosed = (info: any) => {
console.log('Ad closed');
}
Ionic info
Ionic:
Ionic CLI : 6.13.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.5.1
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 2.4.4
@capacitor/core : 2.4.4
Utility:
cordova-res : 0.15.3
native-run : 1.3.0
System:
NodeJS : v14.16.0 (/usr/local/Cellar/node@14/14.16.0_1/bin/node)
npm : 6.14.11
OS : macOS Catalina
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
@joaolnpr I am by no means an expert on Google AdMob but yes, I think your app has to be listed. Sounds like a Google AdMob problem not related to this plugin though. Maybe try contacting the Google AdMob support if you are still having those issues.
Sorry for late. This is released on https://github.com/capacitor-community/admob/releases/tag/v1.3.2