File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -331,8 +331,25 @@ - (void)adLoader:(GADAdLoader *)adLoader didReceiveUnifiedNativeAd:(GADUnifiedNa
331
331
}
332
332
333
333
334
+
334
335
[dic setObject: images forKey: @" images" ];
335
- [dic setValue: [nativeAd.icon.imageURL absoluteString ] forKey: @" icon" ];
336
+ if (nativeAd.icon != nil ) {
337
+ [dic setValue: [nativeAd.icon.imageURL absoluteString ] forKey: @" icon" ];
338
+ } else {
339
+
340
+ NSString * someString = nativeAd.responseInfo .adNetworkClassName ;
341
+ NSLog (@" %@ " , someString);
342
+
343
+ if ([nativeAd.responseInfo.adNetworkClassName isEqualToString: @" GADMAdapterGoogleAdMobAds" ]) {
344
+ [dic setValue: @" noicon" forKey: @" icon" ];
345
+ } else {
346
+ [dic setValue: @" empty" forKey: @" icon" ];
347
+ }
348
+
349
+
350
+ }
351
+
352
+
336
353
[dic setValue: nativeAd.starRating forKey: @" rating" ];
337
354
338
355
self.onUnifiedNativeAdLoaded (dic);
Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ const IconView = (props) => {
20
20
_onLayout ( ) ;
21
21
} , [ nativeAd , nativeAdView ] ) ;
22
22
23
- return nativeAd && nativeAd . icon && nativeAd . icon !== "empty" ? (
23
+ return nativeAd && nativeAd . icon && nativeAd . icon !== "empty" && nativeAd !== "noicon" ? (
24
24
< Image
25
25
{ ...props }
26
26
resizeMode = "cover"
27
27
ref = { iconViewRef }
28
28
onLayout = { _onLayout }
29
29
source = { { uri : nativeAd . icon } }
30
30
/>
31
- ) : nativeAd && nativeAd . icon && nativeAd . icon ! == "noicon" ? null : (
31
+ ) : nativeAd && nativeAd . icon && nativeAd . icon = == "noicon" ? null : (
32
32
< Image
33
33
{ ...props }
34
34
resizeMode = "cover"
You can’t perform that action at this time.
0 commit comments