react-native-applovin-max 5.5.1 → 5.5.2

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.
@@ -35,8 +35,8 @@ android {
35
35
  defaultConfig {
36
36
  minSdkVersion 16
37
37
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
38
- versionCode 5050100
39
- versionName "5.5.1"
38
+ versionCode 5050200
39
+ versionName "5.5.2"
40
40
  }
41
41
 
42
42
  flavorDimensions("default")
@@ -401,7 +401,7 @@ public class AppLovinMAXNativeAdView
401
401
 
402
402
  // Reassure the size of `mediaView` and its children for the networks, such as
403
403
  // LINE, where the actual ad contents are loaded after `mediaView` is sized.
404
- if ( mediaView != null )
404
+ if ( mediaView != null && mediaView.getParent() != null )
405
405
  {
406
406
  sizeToFit( mediaView, (View) mediaView.getParent() );
407
407
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-applovin-max",
3
3
  "author": "AppLovin Corporation",
4
- "version": "5.5.1",
4
+ "version": "5.5.2",
5
5
  "description": "AppLovin MAX React Native Plugin for Android and iOS",
6
6
  "homepage": "https://github.com/AppLovin/AppLovin-MAX-React-Native",
7
7
  "license": "MIT",
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.authors = package["author"]
12
12
 
13
13
  s.platforms = { :ios => "10.0" }
14
- s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_5_5_1" }
14
+ s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_5_5_2" }
15
15
 
16
16
  s.source_files = "ios/AppLovinMAX*.{h,m}"
17
17
 
@@ -50,20 +50,20 @@ const AdView = (props) => {
50
50
  } else {
51
51
  height = isTablet ? 90 : 50;
52
52
  }
53
- setDimensions({width: (style.width && style.width !== 'auto') ? style.width : width,
54
- height: (style.height && style.height !== 'auto') ? style.height : height});
53
+ setDimensions({width: (style?.width && style.width !== 'auto') ? style.width : width,
54
+ height: (style?.height && style.height !== 'auto') ? style.height : height});
55
55
  }
56
56
 
57
57
  // Check whether or not app specifies both width and height but not with 'auto'
58
- const isSizeSpecified = ((style.width && style.width !== 'auto') &&
59
- (style.height && style.height !== 'auto'));
58
+ const isSizeSpecified = ((style?.width && style.width !== 'auto') &&
59
+ (style?.height && style.height !== 'auto'));
60
60
 
61
61
  if (!isSizeSpecified) {
62
62
  if (props.adFormat === AdFormat.BANNER) {
63
63
  sizeForBannerFormat();
64
64
  } else {
65
- setDimensions({width: (style.width && style.width !== 'auto') ? style.width : 300,
66
- height: (style.height && style.height !== 'auto') ? style.height : 250});
65
+ setDimensions({width: (style?.width && style.width !== 'auto') ? style.width : 300,
66
+ height: (style?.height && style.height !== 'auto') ? style.height : 250});
67
67
  }
68
68
  }
69
69
  }, []);
@@ -115,8 +115,8 @@ const AdView = (props) => {
115
115
  };
116
116
 
117
117
  {
118
- const isSizeSpecified = ((style.width && style.width !== 'auto') &&
119
- (style.height && style.height !== 'auto'));
118
+ const isSizeSpecified = ((style?.width && style.width !== 'auto') &&
119
+ (style?.height && style.height !== 'auto'));
120
120
  const isDimensionsSet = (Object.keys(dimensions).length > 0);
121
121
 
122
122
  // Not sized yet
package/src/index.js CHANGED
@@ -6,7 +6,7 @@ import EventListeners from "./AppLovinMAXEventListeners";
6
6
 
7
7
  const { AppLovinMAX } = NativeModules;
8
8
 
9
- const VERSION = "5.5.1";
9
+ const VERSION = "5.5.2";
10
10
 
11
11
  /*---------*/
12
12
  /* BANNERS */