invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
625 stars 121 forks source link

feat(ios, android): add FLUID size support #556

Closed Almouro closed 2 months ago

Almouro commented 3 months ago

Description

Support for FLUID size on Android and fix for iOS FLUID size.

I've built onto this PR to make sure we didn't have to set a fixed height to the ads. We set "width: 100%" and the ads are responsible for setting their own height

Easier to check the whole changes as a whole with whitespace hidden (https://github.com/invertase/react-native-google-mobile-ads/pull/556/files?diff=split&w=1)

Related issues

Android: FLUID size wasn't supported yet on Android. Fixes https://github.com/invertase/react-native-google-mobile-ads/issues/120 iOS: FLUID size was taking full device width. Fixes https://github.com/invertase/react-native-google-mobile-ads/issues/213

Supercedes / Closes #277

Release Summary

feat: add FLUID size support

Checklist

Test Plan

I've used the example app to test my changes (as well as a client app with actual production banners)

iOS A10s Pixel 8
image image image

I've also checked the other banners on Android, since they're affected by this change

Think react-native-google-mobile-ads is great? Please consider supporting the project with any of the below:

🔥

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 3 months ago

Codecov Report

Merging #556 (19377a8) into main (8dd5b93) will increase coverage by 0.06%. The diff coverage is 40.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #556 +/- ## ========================================== + Coverage 43.66% 43.72% +0.06% ========================================== Files 29 30 +1 Lines 536 549 +13 Branches 147 151 +4 ========================================== + Hits 234 240 +6 - Misses 302 309 +7 ```
Almouro commented 3 months ago

When using AdManager and passing multiple sizes including FLUID instead of a single size, I realized that it was still not working properly Added a commit to address that

mikehardy commented 2 months ago

:tada: This PR is included in version 13.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: