react-native-google-mobile-ads 4.1.2 → 5.0.0

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.
Files changed (49) hide show
  1. package/RNGoogleMobileAds.podspec +16 -9
  2. package/__tests__/consent.test.ts +17 -9
  3. package/android/build.gradle +4 -3
  4. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsAppOpenModule.java +2 -5
  5. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsCommon.java +13 -2
  6. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsConsentModule.java +100 -171
  7. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsInterstitialModule.java +6 -5
  8. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsRewardedModule.java +3 -4
  9. package/docs/common-reasons-for-ads-not-showing.mdx +92 -0
  10. package/docs/european-user-consent.mdx +43 -161
  11. package/docs/index.mdx +3 -3
  12. package/docs/migrating-to-v5.mdx +54 -0
  13. package/docs.json +3 -1
  14. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsAppOpenModule.m +1 -2
  15. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsCommon.h +1 -1
  16. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsCommon.m +6 -2
  17. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsConsentModule.h +0 -1
  18. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsConsentModule.m +71 -126
  19. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsInterstitialModule.m +1 -2
  20. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsRewardedModule.m +1 -2
  21. package/ios_config.sh +8 -0
  22. package/lib/commonjs/AdsConsent.js +29 -100
  23. package/lib/commonjs/AdsConsent.js.map +1 -1
  24. package/lib/commonjs/AdsConsentStatus.js +4 -3
  25. package/lib/commonjs/AdsConsentStatus.js.map +1 -1
  26. package/lib/commonjs/validateAdRequestOptions.js +8 -0
  27. package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
  28. package/lib/commonjs/version.js +1 -1
  29. package/lib/commonjs/version.js.map +1 -1
  30. package/lib/module/AdsConsent.js +30 -100
  31. package/lib/module/AdsConsent.js.map +1 -1
  32. package/lib/module/AdsConsentStatus.js +4 -3
  33. package/lib/module/AdsConsentStatus.js.map +1 -1
  34. package/lib/module/validateAdRequestOptions.js +8 -0
  35. package/lib/module/validateAdRequestOptions.js.map +1 -1
  36. package/lib/module/version.js +1 -1
  37. package/lib/module/version.js.map +1 -1
  38. package/lib/typescript/AdsConsentStatus.d.ts +10 -6
  39. package/lib/typescript/index.d.ts +1 -1
  40. package/lib/typescript/types/AdsConsent.interface.d.ts +37 -204
  41. package/lib/typescript/types/RequestOptions.d.ts +8 -0
  42. package/lib/typescript/version.d.ts +1 -1
  43. package/package.json +5 -3
  44. package/src/AdsConsent.ts +36 -135
  45. package/src/AdsConsentStatus.ts +11 -6
  46. package/src/types/AdsConsent.interface.ts +37 -214
  47. package/src/types/RequestOptions.ts +7 -0
  48. package/src/validateAdRequestOptions.ts +7 -0
  49. package/src/version.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["validateAdRequestOptions.ts"],"names":["hasOwnProperty","isArray","isBoolean","isNumber","isObject","isString","isUndefined","isValidUrl","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","location","error","latitude","longitude","locationAccuracy","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,cADF,EAEEC,OAFF,EAGEC,SAHF,EAIEC,QAJF,EAKEC,QALF,EAMEC,QANF,EAOEC,WAPF,EAQEC,UARF,QASO,UATP;AAYA,OAAO,SAASC,wBAAT,CAAkCC,OAAl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AV,CAAN;AACD;;AAED,QAAIoB,UAAU,CAACE,UAAX,IAAyB,CAAC5B,QAAQ,CAAC0B,UAAU,CAACE,UAAZ,CAAtC,EAA+D;AAC7D,YAAM,IAAItB,KAAJ,CAAU,4EAAV,CAAN;AACD;;AAEDD,IAAAA,GAAG,CAACoB,6BAAJ,GAAoCrB,OAAO,CAACqB,6BAA5C;AACD;;AAED,SAAOpB,GAAP;AACD","sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {\n hasOwnProperty,\n isArray,\n isBoolean,\n isNumber,\n isObject,\n isString,\n isUndefined,\n isValidUrl,\n} from './common';\nimport { RequestOptions } from './types/RequestOptions';\n\nexport function validateAdRequestOptions(options?: RequestOptions) {\n const out: RequestOptions = {};\n\n if (isUndefined(options)) {\n return out;\n }\n\n if (!isObject(options)) {\n throw new Error(\"'options' expected an object value\");\n }\n\n if (hasOwnProperty(options, 'requestNonPersonalizedAdsOnly')) {\n if (!isBoolean(options.requestNonPersonalizedAdsOnly)) {\n throw new Error(\"'options.requestNonPersonalizedAdsOnly' expected a boolean value\");\n }\n\n out.requestNonPersonalizedAdsOnly = options.requestNonPersonalizedAdsOnly;\n }\n\n if (options.networkExtras) {\n if (!isObject(options.networkExtras)) {\n throw new Error(\"'options.networkExtras' expected an object of key/value pairs\");\n }\n\n Object.entries(options.networkExtras).forEach(([key, value]) => {\n if (!isString(value)) {\n throw new Error(`'options.networkExtras' expected a string value for object key \"${key}\"`);\n }\n });\n\n out.networkExtras = options.networkExtras;\n }\n\n if (options.keywords) {\n if (!isArray(options.keywords)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n\n for (let i = 0; i < options.keywords.length; i++) {\n const keyword = options.keywords[i];\n\n if (!isString(keyword)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n }\n\n out.keywords = options.keywords;\n }\n\n if (options.contentUrl) {\n if (!isString(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a string value\");\n }\n\n if (!isValidUrl(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a valid HTTP or HTTPS url.\");\n }\n\n if (options.contentUrl.length > 512) {\n throw new Error(\"'options.contentUrl' maximum length of a content URL is 512 characters.\");\n }\n\n out.contentUrl = options.contentUrl;\n }\n\n if (options.location) {\n const error = new Error(\n \"'options.location' expected an array value containing a latitude & longitude number value.\",\n );\n\n if (!isArray(options.location)) {\n throw error;\n }\n\n const [latitude, longitude] = options.location;\n\n if (!isNumber(latitude) || !isNumber(longitude)) {\n throw error;\n }\n\n if (latitude < -90 || latitude > 90) {\n throw new Error(\n `'options.location' latitude value must be a number between -90 and 90, but was: ${latitude}`,\n );\n }\n\n if (longitude < -180 || longitude > 180) {\n throw new Error(\n `'options.location' longitude value must be a number between -180 and 180, but was: ${latitude}`,\n );\n }\n\n out.location = [latitude, longitude];\n }\n\n if (hasOwnProperty(options, 'locationAccuracy')) {\n if (!isNumber(options.locationAccuracy)) {\n throw new Error(\"'options.locationAccuracy' expected a number value.\");\n }\n\n if (isNumber(options.locationAccuracy) && options.locationAccuracy < 0) {\n throw new Error(\"'options.locationAccuracy' expected a number greater than 0.\");\n }\n\n out.locationAccuracy = options.locationAccuracy;\n } else {\n out.locationAccuracy = 5;\n }\n\n if (options.requestAgent) {\n if (!isString(options.requestAgent)) {\n throw new Error(\"'options.requestAgent' expected a string value\");\n }\n\n out.requestAgent = options.requestAgent;\n }\n\n if (options.serverSideVerificationOptions) {\n if (!isObject(options.serverSideVerificationOptions)) {\n throw new Error(\n \"'options.serverSideVerificationOptions' expected an object of key/value pairs\",\n );\n }\n\n const ssvOptions = options.serverSideVerificationOptions;\n\n if (ssvOptions.userId && !isString(ssvOptions.userId)) {\n throw new Error(\"'options.serverSideVerificationOptions.userId' expected a string value\");\n }\n\n if (ssvOptions.customData && !isString(ssvOptions.customData)) {\n throw new Error(\"'options.serverSideVerificationOptions.customData' expected a string value\");\n }\n\n out.serverSideVerificationOptions = options.serverSideVerificationOptions;\n }\n\n return out;\n}\n"]}
1
+ {"version":3,"sources":["validateAdRequestOptions.ts"],"names":["hasOwnProperty","isArray","isBoolean","isNumber","isObject","isString","isUndefined","isValidUrl","validateAdRequestOptions","options","out","Error","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","keywords","i","length","keyword","contentUrl","location","error","latitude","longitude","locationAccuracy","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,cADF,EAEEC,OAFF,EAGEC,SAHF,EAIEC,QAJF,EAKEC,QALF,EAMEC,QANF,EAOEC,WAPF,EAQEC,UARF,QASO,UATP;AAYA,OAAO,SAASC,wBAAT,CAAkCC,OAAlC,EAA4D;AACjE,QAAMC,GAAmB,GAAG,EAA5B;;AAEA,MAAIJ,WAAW,CAACG,OAAD,CAAf,EAA0B;AACxB,WAAOC,GAAP;AACD;;AAED,MAAI,CAACN,QAAQ,CAACK,OAAD,CAAb,EAAwB;AACtB,UAAM,IAAIE,KAAJ,CAAU,oCAAV,CAAN;AACD;;AAED,MAAIX,cAAc,CAACS,OAAD,EAAU,+BAAV,CAAlB,EAA8D;AAC5D,QAAI,CAACP,SAAS,CAACO,OAAO,CAACG,6BAAT,CAAd,EAAuD;AACrD,YAAM,IAAID,KAAJ,CAAU,kEAAV,CAAN;AACD;;AAEDD,IAAAA,GAAG,CAACE,6BAAJ,GAAoCH,OAAO,CAACG,6BAA5C;AACD;;AAED,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AACD;;AAED,SAAOxB,GAAP;AACD","sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {\n hasOwnProperty,\n isArray,\n isBoolean,\n isNumber,\n isObject,\n isString,\n isUndefined,\n isValidUrl,\n} from './common';\nimport { RequestOptions } from './types/RequestOptions';\n\nexport function validateAdRequestOptions(options?: RequestOptions) {\n const out: RequestOptions = {};\n\n if (isUndefined(options)) {\n return out;\n }\n\n if (!isObject(options)) {\n throw new Error(\"'options' expected an object value\");\n }\n\n if (hasOwnProperty(options, 'requestNonPersonalizedAdsOnly')) {\n if (!isBoolean(options.requestNonPersonalizedAdsOnly)) {\n throw new Error(\"'options.requestNonPersonalizedAdsOnly' expected a boolean value\");\n }\n\n out.requestNonPersonalizedAdsOnly = options.requestNonPersonalizedAdsOnly;\n }\n\n if (options.networkExtras) {\n if (!isObject(options.networkExtras)) {\n throw new Error(\"'options.networkExtras' expected an object of key/value pairs\");\n }\n\n Object.entries(options.networkExtras).forEach(([key, value]) => {\n if (!isString(value)) {\n throw new Error(`'options.networkExtras' expected a string value for object key \"${key}\"`);\n }\n });\n\n out.networkExtras = options.networkExtras;\n }\n\n if (options.keywords) {\n if (!isArray(options.keywords)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n\n for (let i = 0; i < options.keywords.length; i++) {\n const keyword = options.keywords[i];\n\n if (!isString(keyword)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n }\n\n out.keywords = options.keywords;\n }\n\n if (options.contentUrl) {\n if (!isString(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a string value\");\n }\n\n if (!isValidUrl(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a valid HTTP or HTTPS url.\");\n }\n\n if (options.contentUrl.length > 512) {\n throw new Error(\"'options.contentUrl' maximum length of a content URL is 512 characters.\");\n }\n\n out.contentUrl = options.contentUrl;\n }\n\n if (options.location) {\n const error = new Error(\n \"'options.location' expected an array value containing a latitude & longitude number value.\",\n );\n\n if (!isArray(options.location)) {\n throw error;\n }\n\n const [latitude, longitude] = options.location;\n\n if (!isNumber(latitude) || !isNumber(longitude)) {\n throw error;\n }\n\n if (latitude < -90 || latitude > 90) {\n throw new Error(\n `'options.location' latitude value must be a number between -90 and 90, but was: ${latitude}`,\n );\n }\n\n if (longitude < -180 || longitude > 180) {\n throw new Error(\n `'options.location' longitude value must be a number between -180 and 180, but was: ${latitude}`,\n );\n }\n\n out.location = [latitude, longitude];\n }\n\n if (hasOwnProperty(options, 'locationAccuracy')) {\n if (!isNumber(options.locationAccuracy)) {\n throw new Error(\"'options.locationAccuracy' expected a number value.\");\n }\n\n if (isNumber(options.locationAccuracy) && options.locationAccuracy < 0) {\n throw new Error(\"'options.locationAccuracy' expected a number greater than 0.\");\n }\n\n out.locationAccuracy = options.locationAccuracy;\n } else {\n out.locationAccuracy = 5;\n }\n\n if (options.requestAgent) {\n if (!isString(options.requestAgent)) {\n throw new Error(\"'options.requestAgent' expected a string value\");\n }\n\n out.requestAgent = options.requestAgent;\n }\n\n if (options.serverSideVerificationOptions) {\n if (!isObject(options.serverSideVerificationOptions)) {\n throw new Error(\n \"'options.serverSideVerificationOptions' expected an object of key/value pairs\",\n );\n }\n\n const ssvOptions = options.serverSideVerificationOptions;\n\n if (ssvOptions.userId && !isString(ssvOptions.userId)) {\n throw new Error(\"'options.serverSideVerificationOptions.userId' expected a string value\");\n }\n\n if (ssvOptions.customData && !isString(ssvOptions.customData)) {\n throw new Error(\"'options.serverSideVerificationOptions.customData' expected a string value\");\n }\n\n out.serverSideVerificationOptions = options.serverSideVerificationOptions;\n }\n\n if (options.customTargeting) {\n if (!isObject(options.customTargeting)) {\n throw new Error(\"'options.customTargeting' expected an object of key/value pairs\");\n }\n out.customTargeting = options.customTargeting;\n }\n\n return out;\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  // generated by genversion
2
- export const version = '4.1.2';
2
+ export const version = '5.0.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["version.ts"],"names":["version"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,OAAhB","sourcesContent":["// generated by genversion\nexport const version = '4.1.2';\n"]}
1
+ {"version":3,"sources":["version.ts"],"names":["version"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,OAAhB","sourcesContent":["// generated by genversion\nexport const version = '5.0.0';\n"]}
@@ -3,15 +3,19 @@
3
3
  */
4
4
  export declare enum AdsConsentStatus {
5
5
  /**
6
- * The consent status is unknown and the user must provide consent to show ads if they are within the EEA or location is also unknown.
6
+ * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.
7
7
  */
8
- UNKNOWN = 0,
8
+ UNKNOWN = "UNKNOWN",
9
9
  /**
10
- * The user has accepted non-personalized ads.
10
+ * User consent required but not yet obtained.
11
11
  */
12
- NON_PERSONALIZED = 1,
12
+ REQUIRED = "REQUIRED",
13
13
  /**
14
- * The user has accepted personalized ads.
14
+ * User consent not required.
15
15
  */
16
- PERSONALIZED = 2
16
+ NOT_REQUIRED = "NOT_REQUIRED",
17
+ /**
18
+ * User consent already obtained.
19
+ */
20
+ OBTAINED = "OBTAINED"
17
21
  }
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "4.1.2";
1
+ export declare const SDK_VERSION = "5.0.0";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
4
4
  export { AdsConsentStatus } from './AdsConsentStatus';
@@ -9,246 +9,81 @@ import { AdsConsentStatus } from '../AdsConsentStatus';
9
9
  * It is recommended that you determine the status of a user's consent at every app launch. The user consent status is held
10
10
  * on the device until a condition changes which requires the user to consent again, such as a change in publishers.
11
11
  *
12
- * For more information, see [here](https://developers.google.com/admob/android/eu-consent#delay_app_measurement_optional).
12
+ * For more information, see [here](https://developers.google.com/admob/ump/android/quick-start#delay_app_measurement_optional).
13
13
  */
14
- /**
15
- * A AdProvider interface returned from `AdsConsent.getProviders`.
16
- */
17
- export interface AdProvider {
18
- /**
19
- * A provider company ID.
20
- */
21
- companyId: string;
22
- /**
23
- * A provider company name.
24
- */
25
- companyName: string;
26
- /**
27
- * A fully formed URL for the privacy policy of the provider.
28
- */
29
- privacyPolicyUrl: string;
30
- }
31
14
  export interface AdsConsentInterface {
32
15
  /**
33
- * Requests user consent for a given list of publisher IDs.
34
- *
35
- * The list of publisher IDs can be obtained from the settings panel on the Google Mobile Ads console. If the list of
36
- * publisher IDs has changed since the last time a user provided consent, their consent status will be reset to
37
- * 'UNKNOWN' and they must provide consent again.
38
- *
39
- * If the request fails with the error "Could not parse Event FE preflight response", this means the state of your
40
- * Google Mobile Ads account is not complete. Ensure you have validated your account and have setup valid payment
41
- * information. This error is also thrown when a Publisher ID is invalid.
16
+ * Requests user consent information.
42
17
  *
43
- * The response from this method provides request location and consent status properties.
44
- *
45
- * If request location is within the EEA or unknown, and the consent status is also unknown, you
46
- * must request consent via the `showForm()` method or your own means.
47
- *
48
- * If the consent status is not unknown, the user has already previously provided consent for the current publisher
49
- * scope.
18
+ * The response from this method provides information about consent form availability and consent status.
50
19
  *
51
20
  * #### Example
52
21
  *
53
22
  * ```js
54
23
  * import { AdsConsent } from 'react-native-google-mobile-ads';
55
24
  *
56
- * const consent = await AdsConsent.requestInfoUpdate(['pub-6189033257628554']);
57
- * console.log('User location within EEA or Unknown:', consent.isRequestLocationInEeaOrUnknown);
58
- * console.log('User consent status:', consent.status);
25
+ * const consentInfo = await AdsConsent.requestInfoUpdate();
26
+ * console.log('A consent form is available:', consentInfo.isConsentFormAvailable);
27
+ * console.log('User consent status:', consentInfo.status);
59
28
  * ```
60
- *
61
- * @param publisherIds A list of publisher IDs found on your Google Mobile Ads dashboard.
29
+ * @param options An AdsConsentInfoOptions interface.
62
30
  */
63
- requestInfoUpdate(publisherIds: string[]): Promise<AdsConsentInfo>;
31
+ requestInfoUpdate(options?: AdsConsentInfoOptions): Promise<AdsConsentInfo>;
64
32
  /**
65
33
  * Shows a Google-rendered user consent form.
66
34
  *
67
- * The Google-rendered consent form is a full-screen configurable form that displays over your app content. The form
68
- * allows the following configuration options:
69
- *
70
- *
71
- * 1. Consent to view personalized ads (via `withPersonalizedAds`).
72
- * 2. Consent to view non-personalized ads (via `withNonPersonalizedAds`).
73
- * 3. Use a paid version of the app instead of viewing ads (via `withAdFree`).
74
- *
75
- * Every consent form requires a privacy policy URL which outlines the usage of your application.
76
- *
77
- * You should review the consent text carefully: what appears by default is a message that might be appropriate if
78
- * you use Google to monetize your app.
79
- *
80
- * If providing an ad-free version of your app, ensure you handle this once the form has been handled by the user
81
- * via the `userPrefersAdFree` property. The users preference on consent is automatically forwarded onto the Google
82
- * Mobile SDKs and saved.
83
- *
84
- * If the user is outside of the EEA, the request form will error.
85
- *
86
35
  * #### Example
87
36
  *
88
37
  * ```js
89
38
  * import { AdsConsent, AdsConsentStatus } from 'react-native-google-mobile-ads';
90
39
  *
91
40
  * async function requestConsent() {
92
- * const consent = await AdsConsent.requestInfoUpdate(['pub-6189033257628554']);
41
+ * const consentInfo = await AdsConsent.requestInfoUpdate();
93
42
  *
94
43
  * // Check if user requires consent
95
- * if (consent.isRequestLocationInEeaOrUnknown && consent.status === AdsConsentStatus.UNKNOWN) {
44
+ * if (
45
+ * consentInfo.isConsentFormAvailable &&
46
+ * (consentInfo.status === AdsConsentStatus.UNKNOWN ||
47
+ * consentInfo.status === AdsConsentStatus.REQUIRED)) {
96
48
  * // Show a Google-rendered form
97
- * const result = await AdsConsent.showForm({
98
- * privacyPolicy: 'https://invertase.io/privacy-policy',
99
- * withPersonalizedAds: true,
100
- * withNonPersonalizedAds: true,
101
- * withAdFree: true,
102
- * });
49
+ * const formResult = await AdsConsent.showForm();
103
50
  *
104
- * console.log('User accepted personalized: ', result.status === AdsConsentStatus.PERSONALIZED);
105
- * console.log('User accepted non-personalized: ', result.status === AdsConsentStatus.NON_PERSONALIZED);
106
- * console.log('User prefers Ad Free version of app: ', result.userPrefersAdFree);
51
+ * console.log('User consent obtained: ', formResult.status === AdsConsentStatus.OBTAINED);
107
52
  * }
108
53
  * }
109
54
  *
110
55
  * ```
111
- *
112
- * @param options An AdsConsentFormOptions interface to control the Google-rendered form.
113
- */
114
- showForm(options: AdsConsentFormOptions): Promise<AdsConsentFormResult>;
115
- /**
116
- * Returns a list of ad providers currently in use for the given Google Mobile Ads App ID.
117
- *
118
- * If requesting consent from the user via your own method, this list of ad providers must be shown to the user
119
- * for them to accept consent.
120
- *
121
- * #### Example
122
- *
123
- * ```js
124
- * import { AdsConsent } from 'react-native-google-mobile-ads';
125
- *
126
- * const providers = await AdsConsent.getAdProviders();
127
- * ```
128
- */
129
- getAdProviders(): Promise<AdProvider[]>;
130
- /**
131
- * Sets the debug geography to locally test consent.
132
- *
133
- * If debugging on an emulator (where location cannot be determined) or outside of the EEA,
134
- * it is possible set your own location to test how your app handles different scenarios.
135
- *
136
- * If using a real device, ensure you have set it as a test device via `addTestDevice()` otherwise this method will have
137
- * no effect.
138
- *
139
- * #### Example
140
- *
141
- * ```js
142
- * import { AdsConsent, AdsConsentDebugGeography } from 'react-native-google-mobile-ads';
143
- *
144
- * // Set disabled
145
- * await AdsConsentDebugGeography.setDebugGeography(AdsConsentDebugGeography.DISABLED);
146
- *
147
- * // Set within EEA
148
- * await AdsConsentDebugGeography.setDebugGeography(AdsConsentDebugGeography.EEA);
149
- *
150
- * // Set outside EEA
151
- * await AdsConsentDebugGeography.setDebugGeography(AdsConsentDebugGeography.NOT_EEA);
152
- * ```
153
- *
154
- * @param geography The debug geography location.
155
- */
156
- setDebugGeography(geography: AdsConsentDebugGeography): Promise<void>;
157
- /**
158
- * Manually update the consent status of the user.
159
- *
160
- * This method is used when providing your own means of user consent. If using the Google-rendered form via `showForm()`,
161
- * the consent status is automatically set and calling this method is not required.
162
- *
163
- * This method can also be used to reset the consent status, by setting it to `AdsConsentStatus.UNKNOWN`, which may be useful in certain circumstances.
164
- *
165
- * #### Example
166
- *
167
- * ```js
168
- * import { AdsConsent, AdsConsentStatus } from 'react-native-google-mobile-ads';
169
- *
170
- * // User accepted personalized ads
171
- * await AdsConsent.setStatus(AdsConsentStatus.PERSONALIZED);
172
- * ```
173
- *
174
- * @param status The user consent status.
175
- */
176
- setStatus(status: AdsConsentStatus): Promise<void>;
177
- /**
178
- * Returns the current consent status of the user.
179
- *
180
- * > The user consent status may change at any time, therefore don't reuse old values locally and always request the current value at any time consent is required.
181
- *
182
- * #### Example
183
- *
184
- * ```js
185
- * import { AdsConsent } from 'react-native-google-mobile-ads';
186
- *
187
- * const status = await AdsConsent.getStatus();
188
- * ```
189
56
  */
190
- getStatus(): Promise<AdsConsentStatus>;
57
+ showForm(): Promise<AdsConsentFormResult>;
191
58
  /**
192
- * If a publisher is aware that the user is under the age of consent, all ad requests must set TFUA (Tag For Users
193
- * Under the Age of consent in Europe). This setting takes effect for all future ad requests.
194
- *
195
- * Once the TFUA setting is enabled, the Google-rendered consent form will fail to load. All ad requests that include
196
- * TFUA will be made ineligible for personalized advertising and remarketing. TFUA disables requests to third-party
197
- * ad technology providers, such as ad measurement pixels and third-party ad servers.
198
- *
199
- * To remove TFUA from ad requests, set the value to `false`.
59
+ * Resets the UMP SDK state.
200
60
  *
201
61
  * #### Example
202
62
  *
203
63
  * ```js
204
- * import { AdsConsent } from 'react-native-google-mobile-ads';
64
+ * import { AdsConsent } from '@invertase/react-native-google-ads';
205
65
  *
206
- * // User is under age of consent
207
- * await AdsConsent.setTagForUnderAgeOfConsent(true);
66
+ * AdsConsent.reset();
208
67
  * ```
209
- *
210
- * @param tag The boolean value to tag for under age consent.
211
68
  */
212
- setTagForUnderAgeOfConsent(tag: boolean): Promise<void>;
213
- /**
214
- * If using a real device to test, ensure the device ID is provided to the Google Mobile Ads SDK so any mock debug locations
215
- * can take effect.
216
- *
217
- * Emulators are automatically on the allowlist and should require no action.
218
- *
219
- * If you are seeing real ad activity from a test device, examine logcat / console
220
- * during execution in association with google mobile ads test device documentation to
221
- * configure your device correctly.
222
- *
223
- * @param deviceIds An array of testing device ID.
224
- */
225
- addTestDevices(deviceIds: string[]): Promise<void>;
69
+ reset(): void;
226
70
  }
227
71
  /**
228
- * The options used to show on the Google-rendered consent form. At least one of `withAdFree`, `withPersonalizedAds` and `WithNonPersonalizedAds` needs to be set to `true`.
72
+ * The options used when requesting consent information.
229
73
  */
230
- export interface AdsConsentFormOptions {
74
+ export interface AdsConsentInfoOptions {
231
75
  /**
232
- * A fully formed HTTP or HTTPS privacy policy URL for your application.
233
- *
234
- * Users will have the option to visit this web page before consenting to ads.
76
+ * Sets the debug geography to locally test consent.
235
77
  */
236
- privacyPolicy: string;
78
+ debugGeography?: AdsConsentDebugGeography;
237
79
  /**
238
80
  * Set to `true` to provide the option for the user to accept being shown personalized ads, defaults to `false`.
239
81
  */
240
- withPersonalizedAds?: boolean;
82
+ tagForUnderAgeOfConsent?: boolean;
241
83
  /**
242
- * Set to `true` to provide the option for the user to accept being shown non-personalized ads, defaults to `false`.
84
+ * An array of test device IDs to allow.
243
85
  */
244
- withNonPersonalizedAds?: boolean;
245
- /**
246
- * Set to `true` to provide the option for the user to choose an ad-free version of your app, defaults to `false`.
247
- *
248
- * If the user chooses this option, you must handle it as required (e.g. navigating to a paid version of the app,
249
- * or a subscribe view).
250
- */
251
- withAdFree?: boolean;
86
+ testDeviceIdentifiers?: string[];
252
87
  }
253
88
  /**
254
89
  * The result of a Google-rendered consent form.
@@ -257,15 +92,12 @@ export interface AdsConsentFormResult {
257
92
  /**
258
93
  * The consent status of the user after closing the consent form.
259
94
  *
260
- * - UNKNOWN: The form was unable to determine the users consent status.
261
- * - NON_PERSONALIZED: The user has accepted non-personalized ads.
262
- * - PERSONALIZED: The user has accepted personalized ads.
95
+ * - `UNKNOWN`: Unknown consent status.
96
+ * - `REQUIRED`: User consent required but not yet obtained.
97
+ * - `NOT_REQUIRED`: User consent not required.
98
+ * - `OBTAINED`: User consent already obtained.
263
99
  */
264
100
  status: AdsConsentStatus;
265
- /**
266
- * If `true`, the user requested an ad-free version of your application.
267
- */
268
- userPrefersAdFree: boolean;
269
101
  }
270
102
  /**
271
103
  * The result of requesting info about a users consent status.
@@ -274,13 +106,14 @@ export interface AdsConsentInfo {
274
106
  /**
275
107
  * The consent status of the user.
276
108
  *
277
- * - UNKNOWN: The consent status is unknown and the user must provide consent to show ads if they are within the EEA or location is also unknown.
278
- * - NON_PERSONALIZED: The user has accepted non-personalized ads.
279
- * - PERSONALIZED: The user has accepted personalized ads.
109
+ * - `UNKNOWN`: Unknown consent status.
110
+ * - `REQUIRED`: User consent required but not yet obtained.
111
+ * - `NOT_REQUIRED`: User consent not required.
112
+ * - `OBTAINED`: User consent already obtained.
280
113
  */
281
114
  status: AdsConsentStatus;
282
115
  /**
283
- * If `true` the user is within the EEA or their location could not be determined.
116
+ * If `true` a consent form is available.
284
117
  */
285
- isRequestLocationInEeaOrUnknown: boolean;
118
+ isConsentFormAvailable: boolean;
286
119
  }
@@ -61,6 +61,14 @@ export interface RequestOptions {
61
61
  * Max length of 512.
62
62
  */
63
63
  contentUrl?: string;
64
+ /**
65
+ * key-value pairs used for custom targeting
66
+ *
67
+ * Takes an array of string key/value pairs.
68
+ */
69
+ customTargeting?: {
70
+ [key: string]: string;
71
+ };
64
72
  /**
65
73
  * The latitude and longitude location of the user.
66
74
  *
@@ -1 +1 @@
1
- export declare const version = "4.1.2";
1
+ export declare const version = "5.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-mobile-ads",
3
- "version": "4.1.2",
3
+ "version": "5.0.0",
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",
@@ -41,14 +41,16 @@
41
41
  ],
42
42
  "sdkVersions": {
43
43
  "ios": {
44
- "googleAds": "8.13.0"
44
+ "googleMobileAds": "8.13.0",
45
+ "googleUmp": "2.0.0"
45
46
  },
46
47
  "android": {
47
48
  "minSdk": 16,
48
49
  "targetSdk": 30,
49
50
  "compileSdk": 31,
50
51
  "buildTools": "31.0.0",
51
- "googleAds": "19.8.0"
52
+ "googleMobileAds": "20.5.0",
53
+ "googleUmp": "2.0.0"
52
54
  }
53
55
  },
54
56
  "react-native-builder-bob": {