react-native-google-mobile-ads 13.2.0 → 13.2.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.
@@ -117,13 +117,17 @@
117
117
  [self addSubview:_banner];
118
118
  _banner.adUnitID = _unitId;
119
119
  [self setRequested:YES];
120
+ __weak typeof(self) weakSelf = self;
120
121
  _banner.paidEventHandler = ^(GADAdValue *_Nonnull value) {
121
- [self sendEvent:@"onPaid"
122
- payload:@{
123
- @"value" : value.value,
124
- @"precision" : @(value.precision),
125
- @"currency" : value.currencyCode,
126
- }];
122
+ typeof(self) strongSelf = weakSelf;
123
+ if (strongSelf) {
124
+ [strongSelf sendEvent:@"onPaid"
125
+ payload:@{
126
+ @"value" : value.value,
127
+ @"precision" : @(value.precision),
128
+ @"currency" : value.currencyCode,
129
+ }];
130
+ }
127
131
  };
128
132
  [_banner loadRequest:[RNGoogleMobileAdsCommon buildAdRequest:_request]];
129
133
  [self sendEvent:@"onSizeChange"
@@ -35,6 +35,11 @@ using namespace facebook::react;
35
35
  [super prepareForRecycle];
36
36
  static const auto defaultProps = std::make_shared<const RNGoogleMobileAdsBannerViewProps>();
37
37
  _props = defaultProps;
38
+
39
+ if (_banner) {
40
+ [_banner removeFromSuperview];
41
+ _banner = nil;
42
+ }
38
43
  }
39
44
 
40
45
  - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps {
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- const version = '13.2.0';
8
+ const version = '13.2.1';
9
9
  exports.version = version;
10
10
  //# sourceMappingURL=version.js.map
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '13.2.0';
2
+ export const version = '13.2.1';
3
3
  //# sourceMappingURL=version.js.map
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "13.2.0";
1
+ export declare const SDK_VERSION = "13.2.1";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
4
4
  export { AdsConsentPurposes } from './AdsConsentPurposes';
@@ -1,2 +1,2 @@
1
- export declare const version = "13.2.0";
1
+ export declare const version = "13.2.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": "13.2.0",
3
+ "version": "13.2.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 = '13.2.0';
2
+ export const version = '13.2.1';