react-native-google-mobile-ads 15.7.0 → 15.8.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.
- package/docs/european-user-consent.mdx +12 -12
- package/ios/RNGoogleMobileAds/RNGoogleMobileAdsNativeModule.mm +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/version.ts +1 -1
|
@@ -11,8 +11,8 @@ Android & iOS, and provides a single JavaScript interface for both platforms.
|
|
|
11
11
|
|
|
12
12
|
## Understanding AdMob Ads
|
|
13
13
|
|
|
14
|
-
Ads served by Google can be categorized as personalized
|
|
15
|
-
|
|
14
|
+
Ads served by Google can be categorized as personalized, non-personalized, Limited ads and technical ads. To understand more about what ads can be served based on a
|
|
15
|
+
user's consent choices, see Ad serving modes ([Android](https://developers.google.com/admob/android/privacy/ad-serving-modes) / [iOS](https://developers.google.com/admob/ios/privacy/ad-serving-modes)).
|
|
16
16
|
|
|
17
17
|
<Info>
|
|
18
18
|
The `AdsConsent` helper only provides you with the tools for requesting consent, it is up to the developer to ensure the consent status is reflected throughout the app.
|
|
@@ -191,10 +191,13 @@ The completion handler is called after the form is dismissed. If consent is not
|
|
|
191
191
|
|
|
192
192
|
To make it easier we added a helper method `gatherConsent` that combines requesting consent information and loading/presenting a consent form if necessary.
|
|
193
193
|
|
|
194
|
-
Before requesting ads in your app, check if you have
|
|
194
|
+
Before requesting ads in your app, check if you have gathered consent aligned with your app's configured messages using `canRequestAds`.
|
|
195
195
|
If an error occurs during the consent gathering process, you should still attempt to request ads.
|
|
196
196
|
The UMP SDK uses the consent status from the previous session.
|
|
197
197
|
|
|
198
|
+
**Note:** For more information on when `canRequestAds` is `true` or `false`, see the reference documentation for [Android](https://developers.google.com/admob/android/reference/privacy/com/google/android/ump/ConsentInformation#canRequestAds()) /
|
|
199
|
+
[iOS](https://developers.google.com/admob/ios/privacy/api/reference/Classes/UMPConsentInformation#canrequestads).
|
|
200
|
+
|
|
198
201
|
```js
|
|
199
202
|
import mobileAds, { AdsConsent, AdsConsentStatus } from 'react-native-google-mobile-ads';
|
|
200
203
|
|
|
@@ -237,9 +240,8 @@ async function startGoogleMobileAdsSDK() {
|
|
|
237
240
|
|
|
238
241
|
### Inspecting consent choices
|
|
239
242
|
|
|
240
|
-
The AdsConsentStatus tells you if you should show the modal to a user or not. Often times you want to run logic based on the user's choices
|
|
241
|
-
|
|
242
|
-
This library exports a method that returns some of the most relevant consent flags to handle common use cases.
|
|
243
|
+
The AdsConsentStatus tells you if you should show the modal to a user or not. Often times you want to run logic based on the user's choices. This library exports a
|
|
244
|
+
method that returns some of the most relevant consent flags to handle common use cases.
|
|
243
245
|
|
|
244
246
|
```js
|
|
245
247
|
import { AdsConsent } from 'react-native-google-mobile-ads';
|
|
@@ -260,10 +262,7 @@ const {
|
|
|
260
262
|
} = await AdsConsent.getUserChoices();
|
|
261
263
|
|
|
262
264
|
if (storeAndAccessInformationOnDevice === false) {
|
|
263
|
-
|
|
264
|
-
* The user declined consent for purpose 1,
|
|
265
|
-
* the Google Mobile Ads SDK won't serve ads.
|
|
266
|
-
*/
|
|
265
|
+
// The user declined consent for purpose 1.
|
|
267
266
|
}
|
|
268
267
|
```
|
|
269
268
|
|
|
@@ -310,6 +309,7 @@ AdsConsent.reset();
|
|
|
310
309
|
|
|
311
310
|
### Troubleshooting
|
|
312
311
|
|
|
313
|
-
In case of troubles, double-check the
|
|
314
|
-
UMP SDK for [Android](https://developers.google.com/admob/ump/android/quick-start) /
|
|
312
|
+
In case of troubles, double-check the following artifacts:
|
|
313
|
+
* Original documentation for underlying UMP SDK for [Android](https://developers.google.com/admob/ump/android/quick-start) /
|
|
315
314
|
[iOS](https://developers.google.com/admob/ump/ios/quick-start).
|
|
315
|
+
* Google Help Center [European regulations](https://support.google.com/admob/topic/10115026) articles.
|
|
@@ -95,7 +95,7 @@ RCT_EXPORT_METHOD(
|
|
|
95
95
|
@"price" : nativeAd.price ?: [NSNull null],
|
|
96
96
|
@"store" : nativeAd.store ?: [NSNull null],
|
|
97
97
|
@"starRating" : nativeAd.starRating ?: [NSNull null],
|
|
98
|
-
@"icon" : nativeAd.icon != nil
|
|
98
|
+
@"icon" : (nativeAd.icon && nativeAd.icon.imageURL != nil)
|
|
99
99
|
? @{@"scale" : @(nativeAd.icon.scale), @"url" : nativeAd.icon.imageURL.absoluteString}
|
|
100
100
|
: [NSNull null],
|
|
101
101
|
@"mediaContent" : @{
|
package/lib/commonjs/version.js
CHANGED
package/lib/module/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "15.
|
|
1
|
+
export declare const SDK_VERSION = "15.8.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 = "15.
|
|
1
|
+
export declare const version = "15.8.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": "15.
|
|
3
|
+
"version": "15.8.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",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"sdkVersions": {
|
|
45
45
|
"ios": {
|
|
46
|
-
"googleMobileAds": "12.
|
|
46
|
+
"googleMobileAds": "12.11.0",
|
|
47
47
|
"googleUmp": "3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"android": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"targetSdk": 34,
|
|
52
52
|
"compileSdk": 34,
|
|
53
53
|
"buildTools": "34.0.0",
|
|
54
|
-
"googleMobileAds": "24.
|
|
54
|
+
"googleMobileAds": "24.6.0",
|
|
55
55
|
"googleUmp": "3.2.0"
|
|
56
56
|
}
|
|
57
57
|
},
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '15.
|
|
2
|
+
export const version = '15.8.1';
|