react-native-google-mobile-ads 16.3.0 → 16.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,6 +104,23 @@ using namespace facebook::react;
104
104
  RCTRNGoogleMobileAdsNativeViewHandleCommand(self, commandName, args);
105
105
  }
106
106
 
107
+ - (UIView *)findViewByTag:(NSInteger)targetTag inView:(UIView *)parentView {
108
+ for (UIView *subview in parentView.subviews) {
109
+ if (subview.tag == targetTag) {
110
+ return subview;
111
+ }
112
+ if ([subview isKindOfClass:[RCTViewComponentView class]]) {
113
+ UIView *contentView = ((RCTViewComponentView *)subview).contentView;
114
+ if (contentView && contentView.tag == targetTag) {
115
+ return contentView;
116
+ }
117
+ }
118
+ UIView *found = [self findViewByTag:targetTag inView:subview];
119
+ if (found) return found;
120
+ }
121
+ return nil;
122
+ }
123
+
107
124
  #else
108
125
  #pragma mark - Paper specific
109
126
 
@@ -128,7 +145,14 @@ using namespace facebook::react;
128
145
 
129
146
  - (void)registerAsset:(NSString *)assetType reactTag:(NSInteger)reactTag {
130
147
  RCTExecuteOnMainQueue(^{
148
+ #ifdef RCT_NEW_ARCH_ENABLED
149
+ UIView *view = [self findViewByTag:reactTag inView:_nativeAdView];
150
+ if (!view) {
151
+ view = [self findViewByTag:reactTag inView:self];
152
+ }
153
+ #else
131
154
  UIView *view = [_bridge.uiManager viewForReactTag:@(reactTag)];
155
+ #endif
132
156
  if (!view) {
133
157
  RCTLogError(@"Cannot find NativeAssetView with tag #%zd while registering asset type %@",
134
158
  reactTag, assetType);
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- const version = exports.version = '16.3.0';
8
+ const version = exports.version = '16.3.1';
9
9
  //# sourceMappingURL=version.js.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  // Generated by genversion.
4
- export const version = '16.3.0';
4
+ export const version = '16.3.1';
5
5
  //# sourceMappingURL=version.js.map
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "16.3.0";
1
+ export declare const SDK_VERSION = "16.3.1";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography, AdsConsentInfo, AdsConsentInfoOptions, AdsConsentInterface, AdsConsentPrivacyOptionsRequirementStatus, AdsConsentStatus, AdsConsentUserChoices, } from './specs/modules/NativeConsentModule';
4
4
  export { AdsConsentPurposes } from './AdsConsentPurposes';
@@ -1,2 +1,2 @@
1
- export declare const version = "16.3.0";
1
+ export declare const version = "16.3.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-mobile-ads",
3
- "version": "16.3.0",
3
+ "version": "16.3.1",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
6
6
  "main": "lib/commonjs/index.js",
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '16.3.0';
2
+ export const version = '16.3.1';