react-native-google-mobile-ads 5.0.0 → 5.1.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.
Files changed (73) hide show
  1. package/RNGoogleMobileAds.podspec +1 -1
  2. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsConsentModule.java +19 -5
  3. package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.java +1 -1
  4. package/docs/common-reasons-for-ads-not-showing.mdx +26 -24
  5. package/docs/displaying-ads-hook.mdx +99 -0
  6. package/docs/displaying-ads.mdx +3 -4
  7. package/docs/european-user-consent.mdx +34 -5
  8. package/docs/index.mdx +13 -13
  9. package/docs/migrating-to-v5.mdx +17 -8
  10. package/docs.json +2 -1
  11. package/ios/RNGoogleMobileAds/RNGoogleMobileAdsConsentModule.m +14 -0
  12. package/lib/commonjs/AdsConsent.js +47 -16
  13. package/lib/commonjs/AdsConsent.js.map +1 -1
  14. package/lib/commonjs/AdsConsentPurposes.js +47 -0
  15. package/lib/commonjs/AdsConsentPurposes.js.map +1 -0
  16. package/lib/commonjs/AdsConsentSpecialFeatures.js +39 -0
  17. package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -0
  18. package/lib/commonjs/hooks/useAppOpenAd.js +51 -0
  19. package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -0
  20. package/lib/commonjs/hooks/useFullScreenAd.js +120 -0
  21. package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -0
  22. package/lib/commonjs/hooks/useInterstitialAd.js +51 -0
  23. package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -0
  24. package/lib/commonjs/hooks/useRewardedAd.js +51 -0
  25. package/lib/commonjs/hooks/useRewardedAd.js.map +1 -0
  26. package/lib/commonjs/index.js +40 -0
  27. package/lib/commonjs/index.js.map +1 -1
  28. package/lib/commonjs/types/AdStates.js +6 -0
  29. package/lib/commonjs/types/AdStates.js.map +1 -0
  30. package/lib/commonjs/version.js +1 -1
  31. package/lib/commonjs/version.js.map +1 -1
  32. package/lib/module/AdsConsent.js +44 -16
  33. package/lib/module/AdsConsent.js.map +1 -1
  34. package/lib/module/AdsConsentPurposes.js +39 -0
  35. package/lib/module/AdsConsentPurposes.js.map +1 -0
  36. package/lib/module/AdsConsentSpecialFeatures.js +31 -0
  37. package/lib/module/AdsConsentSpecialFeatures.js.map +1 -0
  38. package/lib/module/hooks/useAppOpenAd.js +38 -0
  39. package/lib/module/hooks/useAppOpenAd.js.map +1 -0
  40. package/lib/module/hooks/useFullScreenAd.js +109 -0
  41. package/lib/module/hooks/useFullScreenAd.js.map +1 -0
  42. package/lib/module/hooks/useInterstitialAd.js +38 -0
  43. package/lib/module/hooks/useInterstitialAd.js.map +1 -0
  44. package/lib/module/hooks/useRewardedAd.js +38 -0
  45. package/lib/module/hooks/useRewardedAd.js.map +1 -0
  46. package/lib/module/index.js +5 -0
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/types/AdStates.js +2 -0
  49. package/lib/module/types/AdStates.js.map +1 -0
  50. package/lib/module/version.js +1 -1
  51. package/lib/module/version.js.map +1 -1
  52. package/lib/typescript/AdsConsentPurposes.d.ts +148 -0
  53. package/lib/typescript/AdsConsentSpecialFeatures.d.ts +22 -0
  54. package/lib/typescript/hooks/useAppOpenAd.d.ts +9 -0
  55. package/lib/typescript/hooks/useFullScreenAd.d.ts +5 -0
  56. package/lib/typescript/hooks/useInterstitialAd.d.ts +9 -0
  57. package/lib/typescript/hooks/useRewardedAd.d.ts +9 -0
  58. package/lib/typescript/index.d.ts +6 -1
  59. package/lib/typescript/types/AdStates.d.ts +85 -0
  60. package/lib/typescript/types/AdsConsent.interface.d.ts +216 -0
  61. package/lib/typescript/version.d.ts +1 -1
  62. package/package.json +6 -2
  63. package/src/AdsConsent.ts +75 -20
  64. package/src/AdsConsentPurposes.ts +182 -0
  65. package/src/AdsConsentSpecialFeatures.ts +48 -0
  66. package/src/hooks/useAppOpenAd.ts +46 -0
  67. package/src/hooks/useFullScreenAd.ts +104 -0
  68. package/src/hooks/useInterstitialAd.ts +46 -0
  69. package/src/hooks/useRewardedAd.ts +46 -0
  70. package/src/index.ts +5 -0
  71. package/src/types/AdStates.ts +87 -0
  72. package/src/types/AdsConsent.interface.ts +220 -0
  73. package/src/version.ts +1 -1
@@ -0,0 +1,148 @@
1
+ export declare enum AdsConsentPurposes {
2
+ /**
3
+ * Cookies, device identifiers, or other information can be stored or
4
+ * accessed on your device for the purposes presented to you.
5
+ *
6
+ * Vendors can:
7
+ * - Store and access information on the device such as cookies
8
+ * and device identifiers presented to a user.
9
+ */
10
+ STORE_AND_ACCESS_INFORMATION_ON_DEVICE = 1,
11
+ /**
12
+ * Ads can be shown to you based on the content you’re viewing,
13
+ * the app you’re using, your approximate location, or your device type.
14
+ *
15
+ * To do basic ad selection vendors can:
16
+ * - Use real-time information about the context in which the ad will be shown,
17
+ * to show the ad, including information about the content and the device, such as:
18
+ * device type and capabilities, user agent, URL, IP address
19
+ * - Use a user’s non-precise geolocation data
20
+ * - Control the frequency of ads shown to a user.
21
+ * - Sequence the order in which ads are shown to a user.
22
+ * - Prevent an ad from serving in an unsuitable editorial (brand-unsafe) context
23
+ *
24
+ * Vendors cannot:
25
+ * - Create a personalised ads profile using this information for the selection of
26
+ * future ads without a separate legal basis to create a personalised ads profile.
27
+ * - N.B. Non-precise means only an approximate location involving at least a radius
28
+ * of 500 meters is permitted.
29
+ */
30
+ SELECT_BASIC_ADS = 2,
31
+ /**
32
+ * A profile can be built about you and your interests to show you personalised ads
33
+ * that are relevant to you.
34
+ *
35
+ * To create a personalised ads profile vendors can:
36
+ * - Collect information about a user, including a user's activity, interests,
37
+ * demographic information, or location, to create or edit a user profile for use
38
+ * in personalised advertising.
39
+ * - Combine this information with other information previously collected,
40
+ * including from across websites and apps, to create or edit a user profile
41
+ * for use in personalised advertising.
42
+ */
43
+ CREATE_A_PERSONALISED_ADS_PROFILE = 3,
44
+ /**
45
+ * Personalised ads can be shown to you based on a profile about you.
46
+ *
47
+ * To select personalised ads vendors can:
48
+ * - Select personalised ads based on a user profile or other historical user data,
49
+ * including a user’s prior activity, interests, visits to sites or apps, location,
50
+ * or demographic information.
51
+ */
52
+ SELECT_PERSONALISED_ADS = 4,
53
+ /**
54
+ * A profile can be built about you and your interests to show you personalised content
55
+ * that is relevant to you.
56
+ *
57
+ * To create a personalised content profile vendors can:
58
+ * - Collect information about a user, including a user's activity, interests, visits to
59
+ * sites or apps, demographic information, or location, to create or edit a user profile
60
+ * for personalising content.
61
+ * - Combine this information with other information previously collected,
62
+ * including from across websites and apps, to create or edit a user profile for use
63
+ * in personalising content.
64
+ */
65
+ CREATE_A_PERSONALISED_CONTENT_PROFILE = 5,
66
+ /**
67
+ * Personalised content can be shown to you based on a profile about you.
68
+ *
69
+ * To select personalised content vendors can:
70
+ * - Select personalised content based on a user profile or other historical user data,
71
+ * including a user’s prior activity, interests, visits to sites or apps, location,
72
+ * or demographic information.
73
+ */
74
+ SELECT_PERSONALISED_CONTENT = 6,
75
+ /**
76
+ * The performance and effectiveness of ads that you see or interact with can be measured.
77
+ *
78
+ * To measure ad performance vendors can:
79
+ * - Measure whether and how ads were delivered to and interacted with by a user
80
+ * - Provide reporting about ads including their effectiveness and performance
81
+ * - Provide reporting about users who interacted with ads using data observed during
82
+ * the course of the user's interaction with that ad
83
+ * - Provide reporting to publishers about the ads displayed on their property
84
+ * - Measure whether an ad is serving in a suitable editorial environment (brand-safe) context
85
+ * - Determine the percentage of the ad that had the opportunity to be seen and
86
+ * the duration of that opportunity
87
+ * - Combine this information with other information previously collected,
88
+ * including from across websites and apps
89
+ *
90
+ * Vendors cannot:
91
+ * - Apply panel- or similarly-derived audience insights data to ad measurement data
92
+ * without a Legal Basis to apply market research to generate audience insights (Purpose 9)
93
+ */
94
+ MEASURE_AD_PERFORMANCE = 7,
95
+ /**
96
+ * The performance and effectiveness of content that you see or interact with can be measured.
97
+ *
98
+ * To measure content performance vendors can:
99
+ * - Measure and report on how content was delivered to and interacted with by users.
100
+ * - Provide reporting, using directly measurable or known information, about users who
101
+ * interacted with the content
102
+ * - Combine this information with other information previously collected,
103
+ * including from across websites and apps.
104
+ *
105
+ * Vendors cannot:
106
+ * - Measure whether and how ads (including native ads) were delivered to and
107
+ * interacted with by a user.
108
+ * - Apply panel- or similarly derived audience insights data to ad measurement
109
+ * data without a Legal Basis to apply market research to generate audience insights (Purpose 9)
110
+ */
111
+ MEASURE_CONTENT_PERFORMANCE = 8,
112
+ /**
113
+ * Market research can be used to learn more about the audiences who visit sites/apps and view ads.
114
+ *
115
+ * To apply market research to generate audience insights vendors can:
116
+ * - Provide aggregate reporting to advertisers or their representatives about
117
+ * the audiences reached by their ads, through panel-based and similarly derived insights.
118
+ * - Provide aggregate reporting to publishers about the audiences that were served or
119
+ * interacted with content and/or ads on their property by applying
120
+ * panel-based and similarly derived insights.
121
+ * - Associate offline data with an online user for the purposes of
122
+ * market research to generate audience insights if vendors have declared to match and
123
+ * combine offline data sources (Feature 1)
124
+ * - Combine this information with other information previously collected including from
125
+ * across websites and apps.
126
+ *
127
+ * Vendors cannot:
128
+ * - Measure the performance and effectiveness of ads that a specific user was served or
129
+ * interacted with, without a Legal Basis to measure ad performance.
130
+ * - Measure which content a specific user was served and how they interacted with it,
131
+ * without a Legal Basis to measure content performance.
132
+ */
133
+ APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS = 9,
134
+ /**
135
+ * Your data can be used to improve existing systems and software,
136
+ * and to develop new products
137
+ *
138
+ * To develop new products and improve products vendors can:
139
+ * - Use information to improve their existing products with new features and
140
+ * to develop new products
141
+ * - Create new models and algorithms through machine learning
142
+ *
143
+ * Vendors cannot:
144
+ * - Conduct any other data processing operation allowed under
145
+ * a different purpose under this purpose
146
+ */
147
+ DEVELOP_AND_IMPROVE_PRODUCTS = 10
148
+ }
@@ -0,0 +1,22 @@
1
+ export declare enum AdsConsentSpecialFeatures {
2
+ /**
3
+ * Your precise geolocation data can be used in support of one or more purposes.
4
+ * This means your location can be accurate to within several meters.
5
+ *
6
+ * Vendors can:
7
+ * - Collect and process precise geolocation data in support of one or more purposes.
8
+ * - Precise geolocation means that there are no restrictions on the precision of
9
+ * a user's location; this can be accurate to within several meters.
10
+ */
11
+ USE_PRECISE_GEOLOCATION_DATA = 1,
12
+ /**
13
+ * Your device can be identified based on a scan of your device's
14
+ * unique combination of characteristics.
15
+ *
16
+ * Vendors can:
17
+ * - Create an identifier using data collected via actively scanning a device for
18
+ * specific characteristics, e.g. installed fonts or screen resolution.
19
+ * - Use such an identifier to re-identify a device.
20
+ */
21
+ ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION = 2
22
+ }
@@ -0,0 +1,9 @@
1
+ import { AdHookReturns } from '../types/AdStates';
2
+ import { RequestOptions } from '../types/RequestOptions';
3
+ /**
4
+ * React Hook for App Open Ad.
5
+ *
6
+ * @param adUnitId The Ad Unit ID for the App Open Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.
7
+ * @param requestOptions Optional RequestOptions used to load the ad.
8
+ */
9
+ export declare function useAppOpenAd(adUnitId: string | null, requestOptions?: RequestOptions): Omit<AdHookReturns, 'adReward'>;
@@ -0,0 +1,5 @@
1
+ import { AppOpenAd } from '../ads/AppOpenAd';
2
+ import { InterstitialAd } from '../ads/InterstitialAd';
3
+ import { RewardedAd } from '../ads/RewardedAd';
4
+ import { AdHookReturns } from '../types/AdStates';
5
+ export declare function useFullScreenAd<T extends InterstitialAd | RewardedAd | AppOpenAd | null>(ad: T): AdHookReturns;
@@ -0,0 +1,9 @@
1
+ import { AdHookReturns } from '../types/AdStates';
2
+ import { RequestOptions } from '../types/RequestOptions';
3
+ /**
4
+ * React Hook for Interstitial Ad.
5
+ *
6
+ * @param adUnitId The Ad Unit ID for the Interstitial Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.
7
+ * @param requestOptions Optional RequestOptions used to load the ad.
8
+ */
9
+ export declare function useInterstitialAd(adUnitId: string | null, requestOptions?: RequestOptions): Omit<AdHookReturns, 'adReward'>;
@@ -0,0 +1,9 @@
1
+ import { AdHookReturns } from '../types/AdStates';
2
+ import { RequestOptions } from '../types/RequestOptions';
3
+ /**
4
+ * React Hook for Rewarded Ad.
5
+ *
6
+ * @param adUnitId The Ad Unit ID for the Rewarded Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.
7
+ * @param requestOptions Optional RequestOptions used to load the ad.
8
+ */
9
+ export declare function useRewardedAd(adUnitId: string | null, requestOptions?: RequestOptions): Omit<AdHookReturns, 'adReward'>;
@@ -1,6 +1,8 @@
1
- export declare const SDK_VERSION = "5.0.0";
1
+ export declare const SDK_VERSION = "5.1.1";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
4
+ export { AdsConsentPurposes } from './AdsConsentPurposes';
5
+ export { AdsConsentSpecialFeatures } from './AdsConsentSpecialFeatures';
4
6
  export { AdsConsentStatus } from './AdsConsentStatus';
5
7
  export { MaxAdContentRating } from './MaxAdContentRating';
6
8
  export { TestIds } from './TestIds';
@@ -12,3 +14,6 @@ export { AppOpenAd } from './ads/AppOpenAd';
12
14
  export { InterstitialAd } from './ads/InterstitialAd';
13
15
  export { RewardedAd } from './ads/RewardedAd';
14
16
  export { BannerAd } from './ads/BannerAd';
17
+ export { useAppOpenAd } from './hooks/useAppOpenAd';
18
+ export { useInterstitialAd } from './hooks/useInterstitialAd';
19
+ export { useRewardedAd } from './hooks/useRewardedAd';
@@ -0,0 +1,85 @@
1
+ import { AdShowOptions } from './AdShowOptions';
2
+ import { RewardedAdReward } from './RewardedAdReward';
3
+ export interface AdStates {
4
+ /**
5
+ * Whether the ad is loaded and ready to to be shown to the user.
6
+ */
7
+ isLoaded: boolean;
8
+ /**
9
+ * Whether the ad is opened.
10
+ */
11
+ isOpened: boolean;
12
+ /**
13
+ * Whether the user clicked the advert.
14
+ */
15
+ isClicked: boolean;
16
+ /**
17
+ * Whether the user closed the ad and has returned back to your application.
18
+ */
19
+ isClosed: boolean;
20
+ /**
21
+ * JavaScript Error containing the error code and message thrown by the Ad.
22
+ */
23
+ error?: Error;
24
+ /**
25
+ * Loaded reward item of the Rewarded Ad.
26
+ */
27
+ reward?: RewardedAdReward;
28
+ /**
29
+ * Whether the user earned the reward by Rewarded Ad.
30
+ */
31
+ isEarnedReward?: boolean;
32
+ }
33
+ export interface AdHookReturns extends AdStates {
34
+ /**
35
+ * Whether your ad is showing.
36
+ * The value is equal with `isOpened && !isClosed`.
37
+ */
38
+ isShowing: boolean;
39
+ /**
40
+ * Start loading the advert with the provided RequestOptions.
41
+ * #### Example
42
+ *
43
+ * ```jsx
44
+ * export default function App() {
45
+ * const interstitial = useInterstitialAd(TestIds.INTERSTITIAL, {
46
+ * requestNonPersonalizedAdsOnly: true,
47
+ * });
48
+ * useEffect(() => {
49
+ * interstitial.load();
50
+ * }, [interstitial.load]);
51
+ * }
52
+ * ```
53
+ */
54
+ load: () => void;
55
+ /**
56
+ * Show the loaded advert to the user.
57
+ *
58
+ * #### Example
59
+ *
60
+ * ```jsx
61
+ * export default function App() {
62
+ * const interstitial = useInterstitialAd(TestIds.INTERSTITIAL, {
63
+ * requestNonPersonalizedAdsOnly: true,
64
+ * });
65
+ * return (
66
+ * <View>
67
+ * <Button
68
+ * title="Navigate to next screen"
69
+ * onPress={() => {
70
+ * if (interstitial.isLoaded) {
71
+ * interstitial.show();
72
+ * } else {
73
+ * navigation.navigate('NextScreen');
74
+ * }
75
+ * }}
76
+ * />
77
+ * </View>
78
+ * )
79
+ * }
80
+ * ```
81
+ *
82
+ * @param showOptions An optional `AdShowOptions` interface.
83
+ */
84
+ show: (showOptions?: AdShowOptions) => void;
85
+ }
@@ -1,3 +1,4 @@
1
+ import { TCModel } from '@iabtcf/core';
1
2
  import { AdsConsentDebugGeography } from '../AdsConsentDebugGeography';
2
3
  import { AdsConsentStatus } from '../AdsConsentStatus';
3
4
  /**
@@ -55,6 +56,47 @@ export interface AdsConsentInterface {
55
56
  * ```
56
57
  */
57
58
  showForm(): Promise<AdsConsentFormResult>;
59
+ /**
60
+ * Returns the value stored under the `IABTCF_TCString` key
61
+ * in NSUserDefaults (iOS) / SharedPreferences (Android) as
62
+ * defined by the IAB Europe Transparency & Consent Framework.
63
+ *
64
+ * More information available here:
65
+ * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details
66
+ *
67
+ * #### Example
68
+ *
69
+ * ```js
70
+ * import { AdsConsent } from '@invertase/react-native-google-ads';
71
+ *
72
+ * const tcString = await AdsConsent.getTCString();
73
+ * ```
74
+ */
75
+ getTCString(): Promise<string>;
76
+ /**
77
+ * Returns the TC Model of the saved IAB TCF 2.0 String.
78
+ *
79
+ * #### Example
80
+ *
81
+ * ```js
82
+ * import { AdsConsent } from '@invertase/react-native-google-ads';
83
+ *
84
+ * const tcModel = await AdsConsent.getTCModel();
85
+ * ```
86
+ */
87
+ getTCModel(): Promise<TCModel>;
88
+ /**
89
+ * Provides information about a user's consent choices.
90
+ *
91
+ * #### Example
92
+ *
93
+ * ```js
94
+ * import { AdsConsent } from '@invertase/react-native-google-ads';
95
+ *
96
+ * const { storeAndAccessInformationOnDevice } = await AdsConsent.getUserChoices();
97
+ * ```
98
+ */
99
+ getUserChoices(): Promise<AdsConsentUserChoices>;
58
100
  /**
59
101
  * Resets the UMP SDK state.
60
102
  *
@@ -117,3 +159,177 @@ export interface AdsConsentInfo {
117
159
  */
118
160
  isConsentFormAvailable: boolean;
119
161
  }
162
+ /**
163
+ * The options used when requesting consent information.
164
+ *
165
+ * https://vendor-list.consensu.org/v2/vendor-list.json
166
+ * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
167
+ */
168
+ export interface AdsConsentUserChoices {
169
+ /**
170
+ * Your device can be identified based on a scan of your device's
171
+ * unique combination of characteristics.
172
+ *
173
+ * Vendors can:
174
+ * - Create an identifier using data collected via actively scanning a device for
175
+ * - specific characteristics, e.g. installed fonts or screen resolution.
176
+ * - Use such an identifier to re-identify a device.
177
+ */
178
+ activelyScanDeviceCharacteristicsForIdentification: boolean;
179
+ /**
180
+ * Market research can be used to learn more about the audiences who visit sites/apps and view ads.
181
+ *
182
+ * To apply market research to generate audience insights vendors can:
183
+ * - Provide aggregate reporting to advertisers or their representatives about
184
+ * the audiences reached by their ads, through panel-based and similarly derived insights.
185
+ * - Provide aggregate reporting to publishers about the audiences that were served or
186
+ * interacted with content and/or ads on their property by applying
187
+ * panel-based and similarly derived insights.
188
+ * - Associate offline data with an online user for the purposes of
189
+ * market research to generate audience insights if vendors have declared to match and
190
+ * combine offline data sources (Feature 1)
191
+ * - Combine this information with other information previously collected including from
192
+ * across websites and apps.
193
+ *
194
+ * Vendors cannot:
195
+ * - Measure the performance and effectiveness of ads that a specific user was served or
196
+ * interacted with, without a Legal Basis to measure ad performance.
197
+ * - Measure which content a specific user was served and how they interacted with it,
198
+ * without a Legal Basis to measure content performance.
199
+ */
200
+ applyMarketResearchToGenerateAudienceInsights: boolean;
201
+ /**
202
+ * A profile can be built about you and your interests to show you personalised ads
203
+ * that are relevant to you.
204
+ *
205
+ * To create a personalised ads profile vendors can:
206
+ * - Collect information about a user, including a user's activity, interests,
207
+ * demographic information, or location, to create or edit a user profile for use
208
+ * in personalised advertising.
209
+ * - Combine this information with other information previously collected,
210
+ * including from across websites and apps, to create or edit a user profile
211
+ * for use in personalised advertising.
212
+ */
213
+ createAPersonalisedAdsProfile: boolean;
214
+ /**
215
+ * A profile can be built about you and your interests to show you personalised content
216
+ * that is relevant to you.
217
+ *
218
+ * To create a personalised content profile vendors can:
219
+ * - Collect information about a user, including a user's activity, interests, visits to
220
+ * sites or apps, demographic information, or location, to create or edit a user profile
221
+ * for personalising content.
222
+ * - Combine this information with other information previously collected,
223
+ * including from across websites and apps, to create or edit a user profile for use
224
+ * in personalising content.
225
+ */
226
+ createAPersonalisedContentProfile: boolean;
227
+ /**
228
+ * Your data can be used to improve existing systems and software,
229
+ * and to develop new products
230
+ *
231
+ * To develop new products and improve products vendors can:
232
+ * - Use information to improve their existing products with new features and
233
+ * to develop new products
234
+ * - Create new models and algorithms through machine learning
235
+ *
236
+ * Vendors cannot:
237
+ * - Conduct any other data processing operation allowed under
238
+ * a different purpose under this purpose
239
+ */
240
+ developAndImproveProducts: boolean;
241
+ /**
242
+ * The performance and effectiveness of ads that you see or interact with can be measured.
243
+ *
244
+ * To measure ad performance vendors can:
245
+ * - Measure whether and how ads were delivered to and interacted with by a user
246
+ * - Provide reporting about ads including their effectiveness and performance
247
+ * - Provide reporting about users who interacted with ads using data observed during
248
+ * the course of the user's interaction with that ad
249
+ * - Provide reporting to publishers about the ads displayed on their property
250
+ * - Measure whether an ad is serving in a suitable editorial environment (brand-safe) context
251
+ * - Determine the percentage of the ad that had the opportunity to be seen and
252
+ * the duration of that opportunity
253
+ * - Combine this information with other information previously collected,
254
+ * including from across websites and apps
255
+ *
256
+ * Vendors cannot:
257
+ * - Apply panel- or similarly-derived audience insights data to ad measurement data
258
+ * without a Legal Basis to apply market research to generate audience insights (Purpose 9)
259
+ */
260
+ measureAdPerformance: boolean;
261
+ /**
262
+ * The performance and effectiveness of content that you see or interact with can be measured.
263
+ *
264
+ * To measure content performance vendors can:
265
+ * - Measure and report on how content was delivered to and interacted with by users.
266
+ * - Provide reporting, using directly measurable or known information, about users who
267
+ * interacted with the content
268
+ * - Combine this information with other information previously collected,
269
+ * including from across websites and apps.
270
+ *
271
+ * Vendors cannot:
272
+ * - Measure whether and how ads (including native ads) were delivered to and
273
+ * interacted with by a user.
274
+ * - Apply panel- or similarly derived audience insights data to ad measurement
275
+ * data without a Legal Basis to apply market research to generate audience insights (Purpose 9)
276
+ */
277
+ measureContentPerformance: boolean;
278
+ /**
279
+ * Ads can be shown to you based on the content you’re viewing,
280
+ * the app you’re using, your approximate location, or your device type.
281
+ *
282
+ * To do basic ad selection vendors can:
283
+ * - Use real-time information about the context in which the ad will be shown,
284
+ * to show the ad, including information about the content and the device, such as:
285
+ * device type and capabilities, user agent, URL, IP address
286
+ * - Use a user’s non-precise geolocation data
287
+ * - Control the frequency of ads shown to a user.
288
+ * - Sequence the order in which ads are shown to a user.
289
+ * - Prevent an ad from serving in an unsuitable editorial (brand-unsafe) context
290
+ *
291
+ * Vendors cannot:
292
+ * - Create a personalised ads profile using this information for the selection of
293
+ * future ads without a separate legal basis to create a personalised ads profile.
294
+ * - N.B. Non-precise means only an approximate location involving at least a radius
295
+ * of 500 meters is permitted.
296
+ */
297
+ selectBasicAds: boolean;
298
+ /**
299
+ * Personalised ads can be shown to you based on a profile about you.
300
+ *
301
+ * To select personalised ads vendors can:
302
+ * - Select personalised ads based on a user profile or other historical user data,
303
+ * including a user’s prior activity, interests, visits to sites or apps, location,
304
+ * or demographic information.
305
+ */
306
+ selectPersonalisedAds: boolean;
307
+ /**
308
+ * Personalised content can be shown to you based on a profile about you.
309
+ *
310
+ * To select personalised content vendors can:
311
+ * - Select personalised content based on a user profile or other historical user data,
312
+ * including a user’s prior activity, interests, visits to sites or apps, location,
313
+ * or demographic information.
314
+ */
315
+ selectPersonalisedContent: boolean;
316
+ /**
317
+ * Cookies, device identifiers, or other information can be stored or
318
+ * accessed on your device for the purposes presented to you.
319
+ *
320
+ * Vendors can:
321
+ * - Store and access information on the device such as cookies and
322
+ * device identifiers presented to a user.
323
+ */
324
+ storeAndAccessInformationOnDevice: boolean;
325
+ /**
326
+ * Your precise geolocation data can be used in support of one or more purposes.
327
+ * This means your location can be accurate to within several meters.
328
+ *
329
+ * Vendors can:
330
+ * - Collect and process precise geolocation data in support of one or more purposes.
331
+ * - Precise geolocation means that there are no restrictions on the precision of
332
+ * a user's location; this can be accurate to within several meters.
333
+ */
334
+ usePreciseGeolocationData: boolean;
335
+ }
@@ -1 +1 @@
1
- export declare const version = "5.0.0";
1
+ export declare const version = "5.1.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-mobile-ads",
3
- "version": "5.0.0",
3
+ "version": "5.1.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",
@@ -72,7 +72,7 @@
72
72
  "lint:ios:check": "clang-format --glob=\"ios/**/*.{h,cpp,m,mm}\" --style=Google -n -Werror",
73
73
  "lint:ios:fix": "clang-format -i --glob=\"ios/**/*.{h,cpp,m,mm}\" --style=Google",
74
74
  "lint:markdown:check": "prettier --check \"docs/**/*.md[x]\"",
75
- "lint:markdown:fix": "prettier --write \"docs/**/*.md\"",
75
+ "lint:markdown:fix": "prettier --write \"docs/**/*.md[x]\"",
76
76
  "lint:report": "eslint --output-file=eslint-report.json --format=json . --ext .js,.jsx,.ts,.tsx",
77
77
  "lint:spellcheck": "spellchecker --quiet --files=\"docs/**/*.md\" --dictionaries=\"./.spellcheck.dict.txt\" --reports=\"spelling.json\" --plugins spell indefinite-article repeated-words syntax-mentions syntax-urls frontmatter",
78
78
  "tsc:compile": "tsc --project . --noEmit",
@@ -98,6 +98,10 @@
98
98
  "tests:ios:test-cover-reuse": "cd example && node_modules/.bin/nyc yarn detox test --configuration ios.sim.debug --reuse --loglevel warn",
99
99
  "tests:ios:pod:install": "cd example && cd ios && rm -rf example.xcworkspace && rm -f Podfile.lock && pod install --repo-update && cd .."
100
100
  },
101
+ "dependencies": {
102
+ "@iabtcf/core": "^1.4.0",
103
+ "use-deep-compare-effect": "^1.8.1"
104
+ },
101
105
  "devDependencies": {
102
106
  "@babel/core": "^7.16.0",
103
107
  "@babel/preset-env": "^7.16.4",