forked from sbugert/react-native-admob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use RCTBubblingEventBlocks in RNAdMobInterstitial & RNAdMobRewarded a…
…s well.
- Loading branch information
1 parent
6974b11
commit 3bec144
Showing
6 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
#if __has_include(<React/RCTBridgeModule.h>) | ||
#if __has_include(<React/RCTComponent.h>) | ||
#import <React/RCTComponent.h> | ||
#import <React/RCTBridgeModule.h> | ||
#import <React/RCTEventDispatcher.h> | ||
#else | ||
#import "RCTComponent.h" | ||
#import "RCTBridgeModule.h" | ||
#import "RCTEventDispatcher.h" | ||
#endif | ||
|
||
@import GoogleMobileAds; | ||
|
||
@interface RNAdMobInterstitial : NSObject <RCTBridgeModule, GADInterstitialDelegate> | ||
|
||
@property (nonatomic, copy) RCTBubblingEventBlock onInterstitialDidLoad; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onInterstitialDidFailToLoad; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onInterstitialDidOpen; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onInterstitialDidClose; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onInterstitialWillLeaveApplication; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
#if __has_include(<React/RCTEventDispatcher.h>) | ||
#import <React/RCTEventDispatcher.h> | ||
#if __has_include(<React/RCTComponent.h>) | ||
#import <React/RCTComponent.h> | ||
#import <React/RCTBridgeModule.h> | ||
#else | ||
#import "RCTEventDispatcher.h" | ||
#import "RCTComponent.h" | ||
#import "RCTBridgeModule.h" | ||
#endif | ||
|
||
@import GoogleMobileAds; | ||
|
||
@interface RNAdMobRewarded : NSObject <RCTBridgeModule, GADRewardBasedVideoAdDelegate> | ||
|
||
@property (nonatomic, copy) RCTBubblingEventBlock onRewardedVideoDidRewardUser; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onRewardedVideoDidLoad; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onRewardedVideoDidOpen; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onRewardedVideoDidClose; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onRewardedVideoWillLeaveApplication; | ||
@property (nonatomic, copy) RCTBubblingEventBlock onRewardedVideoDidFailToLoad; | ||
|
||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters