-
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ios): sdk methods and banners on new architecture
- Loading branch information
Showing
25 changed files
with
615 additions
and
215 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
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
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
21 changes: 21 additions & 0 deletions
21
android/src/main/java/io/invertase/googlemobileads/OnNativeEvent.kt
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.invertase.googlemobileads | ||
|
||
import com.facebook.react.bridge.WritableMap | ||
import com.facebook.react.uimanager.events.Event | ||
|
||
class OnNativeEvent(viewId: Int, private val event: WritableMap) : Event<OnNativeEvent>(viewId) { | ||
|
||
override fun getEventName(): String { | ||
return EVENT_NAME | ||
} | ||
|
||
override fun getCoalescingKey(): Short = 0 | ||
|
||
override fun getEventData(): WritableMap? { | ||
return event | ||
} | ||
|
||
companion object { | ||
const val EVENT_NAME = "topNative" | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// This guard prevent this file to be compiled in the old architecture. | ||
#ifdef RCT_NEW_ARCH_ENABLED | ||
#import <GoogleMobileAds/GADAppEventDelegate.h> | ||
#import <GoogleMobileAds/GADBannerView.h> | ||
#import <GoogleMobileAds/GADBannerViewDelegate.h> | ||
#import <React/RCTViewComponentView.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
#ifndef NativeComponentExampleComponentView_h | ||
#define NativeComponentExampleComponentView_h | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface RNGoogleMobileAdsBannerView | ||
: RCTViewComponentView <GADBannerViewDelegate, GADAppEventDelegate> | ||
|
||
@property GADBannerView *banner; | ||
@property(nonatomic, assign) BOOL requested; | ||
|
||
@property(nonatomic, copy) NSArray *sizes; | ||
@property(nonatomic, copy) NSString *unitId; | ||
@property(nonatomic, copy) NSDictionary *request; | ||
@property(nonatomic, copy) NSNumber *manualImpressionsEnabled; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END | ||
|
||
#endif /* NativeComponentExampleComponentView_h */ | ||
#endif /* RCT_NEW_ARCH_ENABLED */ |
Oops, something went wrong.