Skip to content

Commit

Permalink
Merge pull request #102 from yamshing/master
Browse files Browse the repository at this point in the history
banner enable delay added
  • Loading branch information
Shin-NiL authored Aug 25, 2019
2 parents f1dcaa3 + 8dc9086 commit af9c58e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions admob/ios/src/AdmobBanner.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#import <GoogleMobileAds/GADBannerView.h>
#import "app_delegate.h"

#define BANNER_ENABLE_DELAY 5

@interface AdmobBanner: NSObject <GADBannerViewDelegate> {
GADBannerView *bannerView;
bool initialized;
Expand Down
2 changes: 1 addition & 1 deletion admob/ios/src/AdmobInterstitial.mm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ - (void)interstitialWillPresentScreen:(GADInterstitial *)ad {
/// Tells the delegate the interstitial is to be animated off the screen.
- (void)interstitialWillDismissScreen:(GADInterstitial *)ad {
NSLog(@"interstitialWillDismissScreen");
[self performSelector:@selector(bannerEnable) withObject:nil afterDelay:0];
[self performSelector:@selector(bannerEnable) withObject:nil afterDelay:BANNER_ENABLE_DELAY];
}
- (void)bannerEnable{
NSLog(@"banner enable call");
Expand Down
3 changes: 2 additions & 1 deletion admob/ios/src/AdmobRewarded.mm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ - (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVi

- (void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd {
NSLog(@"Reward based video ad is closed.");
[self performSelector:@selector(bannerEnable) withObject:nil afterDelay:0];
NSLog(@"Enable Banner with delay:%d",BANNER_ENABLE_DELAY);
[self performSelector:@selector(bannerEnable) withObject:nil afterDelay:BANNER_ENABLE_DELAY];
Object *obj = ObjectDB::get_instance(instanceId);
obj->call_deferred("_on_rewarded_video_ad_closed");
}
Expand Down

0 comments on commit af9c58e

Please sign in to comment.