react-native-google-mobile-ads 14.5.0 → 14.6.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.
- package/README.md +2 -2
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeAppModule.java +0 -28
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt +13 -0
- package/ios/RNGoogleMobileAds/RNGoogleMobileAdsConsentModule.h +13 -2
- package/ios/RNGoogleMobileAds/{RNGoogleMobileAdsConsentModule.m → RNGoogleMobileAdsConsentModule.mm} +114 -27
- package/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm +17 -0
- package/ios/RNGoogleMobileAds/common/{RNAppModule.m → RNAppModule.mm} +0 -76
- package/ios/RNGoogleMobileAds/common/RNSharedUtils.h +0 -4
- package/ios/RNGoogleMobileAds/common/{RNSharedUtils.m → RNSharedUtils.mm} +0 -21
- package/lib/commonjs/AdsConsent.js +16 -16
- package/lib/commonjs/AdsConsent.js.map +1 -1
- package/lib/commonjs/common/constants.js +4 -3
- package/lib/commonjs/common/constants.js.map +1 -1
- package/lib/commonjs/index.js +34 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/modules/NativeConsentModule.js +67 -0
- package/lib/commonjs/specs/modules/NativeConsentModule.js.map +1 -0
- package/lib/commonjs/specs/modules/NativeGoogleMobileAdsModule.js.map +1 -1
- package/lib/commonjs/types/index.js +0 -11
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/AdsConsent.js +2 -3
- package/lib/module/AdsConsent.js.map +1 -1
- package/lib/module/common/constants.js +3 -3
- package/lib/module/common/constants.js.map +1 -1
- package/lib/module/index.js +1 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/modules/NativeConsentModule.js +68 -0
- package/lib/module/specs/modules/NativeConsentModule.js.map +1 -0
- package/lib/module/specs/modules/NativeGoogleMobileAdsModule.js.map +1 -1
- package/lib/module/types/index.js +0 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/AdsConsent.d.ts +1 -1
- package/lib/typescript/AdsConsent.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/{types/AdsConsent.interface.d.ts → specs/modules/NativeConsentModule.d.ts} +249 -172
- package/lib/typescript/specs/modules/NativeConsentModule.d.ts.map +1 -0
- package/lib/typescript/specs/modules/NativeGoogleMobileAdsModule.d.ts +6 -0
- package/lib/typescript/specs/modules/NativeGoogleMobileAdsModule.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +0 -1
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/AdsConsent.ts +17 -21
- package/src/common/constants.ts +2 -2
- package/src/index.ts +9 -3
- package/src/{types/AdsConsent.interface.ts → specs/modules/NativeConsentModule.ts} +262 -174
- package/src/specs/modules/NativeGoogleMobileAdsModule.ts +7 -0
- package/src/types/index.ts +0 -1
- package/src/version.ts +1 -1
- package/ios/RNGoogleMobileAds/common/RNJSON.h +0 -34
- package/ios/RNGoogleMobileAds/common/RNJSON.m +0 -93
- package/ios/RNGoogleMobileAds/common/RNMeta.h +0 -30
- package/ios/RNGoogleMobileAds/common/RNMeta.m +0 -61
- package/ios/RNGoogleMobileAds/common/RNPreferences.h +0 -44
- package/ios/RNGoogleMobileAds/common/RNPreferences.m +0 -94
- package/lib/commonjs/AdsConsentDebugGeography.js +0 -34
- package/lib/commonjs/AdsConsentDebugGeography.js.map +0 -1
- package/lib/commonjs/AdsConsentPrivacyOptionsRequirementStatus.js +0 -32
- package/lib/commonjs/AdsConsentPrivacyOptionsRequirementStatus.js.map +0 -1
- package/lib/commonjs/AdsConsentStatus.js +0 -33
- package/lib/commonjs/AdsConsentStatus.js.map +0 -1
- package/lib/commonjs/types/AdsConsent.interface.js +0 -6
- package/lib/commonjs/types/AdsConsent.interface.js.map +0 -1
- package/lib/module/AdsConsentDebugGeography.js +0 -29
- package/lib/module/AdsConsentDebugGeography.js.map +0 -1
- package/lib/module/AdsConsentPrivacyOptionsRequirementStatus.js +0 -27
- package/lib/module/AdsConsentPrivacyOptionsRequirementStatus.js.map +0 -1
- package/lib/module/AdsConsentStatus.js +0 -28
- package/lib/module/AdsConsentStatus.js.map +0 -1
- package/lib/module/types/AdsConsent.interface.js +0 -2
- package/lib/module/types/AdsConsent.interface.js.map +0 -1
- package/lib/typescript/AdsConsentDebugGeography.d.ts +0 -20
- package/lib/typescript/AdsConsentDebugGeography.d.ts.map +0 -1
- package/lib/typescript/AdsConsentPrivacyOptionsRequirementStatus.d.ts +0 -18
- package/lib/typescript/AdsConsentPrivacyOptionsRequirementStatus.d.ts.map +0 -1
- package/lib/typescript/AdsConsentStatus.d.ts +0 -22
- package/lib/typescript/AdsConsentStatus.d.ts.map +0 -1
- package/lib/typescript/types/AdsConsent.interface.d.ts.map +0 -1
- package/src/AdsConsentDebugGeography.ts +0 -38
- package/src/AdsConsentPrivacyOptionsRequirementStatus.ts +0 -36
- package/src/AdsConsentStatus.ts +0 -41
- /package/ios/RNGoogleMobileAds/common/{RNRCTEventEmitter.m → RNRCTEventEmitter.mm} +0 -0
package/README.md
CHANGED
|
@@ -40,9 +40,9 @@ When using The New Architecture, some legacy code will still be used though. See
|
|
|
40
40
|
| iOS | Mobile Ads SDK Methods (Turbo Native Module) | ✅ Complete |
|
|
41
41
|
| iOS | Banners (Fabric Native Component) | ✅ Complete |
|
|
42
42
|
| iOS | Full Screen Ads (Turbo Native Module) | ✅ Complete |
|
|
43
|
-
| iOS | User Messaging Platform (Turbo Native Module) |
|
|
43
|
+
| iOS | User Messaging Platform (Turbo Native Module) | ✅ Complete |
|
|
44
44
|
| iOS | EventEmitter (Turbo Native Module) | ⏳ To-Do |
|
|
45
|
-
| iOS | Revenue Precision Constants (Turbo Native Module) |
|
|
45
|
+
| iOS | Revenue Precision Constants (Turbo Native Module) | ✅ Complete |
|
|
46
46
|
| Android | Mobile Ads SDK Methods (Turbo Native Module) | ⏳ To-Do |
|
|
47
47
|
| Android | Banners (Fabric Native Component) | ⏳ To-Do |
|
|
48
48
|
| Android | Full Screen Ads (Turbo Native Module) | ⏳ To-Do |
|
|
@@ -21,7 +21,6 @@ import com.facebook.react.bridge.Promise;
|
|
|
21
21
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
22
22
|
import com.facebook.react.bridge.ReactMethod;
|
|
23
23
|
import com.facebook.react.bridge.ReadableMap;
|
|
24
|
-
import com.google.android.gms.ads.AdValue;
|
|
25
24
|
import io.invertase.googlemobileads.common.RCTConvert;
|
|
26
25
|
import io.invertase.googlemobileads.common.ReactNativeEvent;
|
|
27
26
|
import io.invertase.googlemobileads.common.ReactNativeEventEmitter;
|
|
@@ -29,8 +28,6 @@ import io.invertase.googlemobileads.common.ReactNativeJSON;
|
|
|
29
28
|
import io.invertase.googlemobileads.common.ReactNativeMeta;
|
|
30
29
|
import io.invertase.googlemobileads.common.ReactNativeModule;
|
|
31
30
|
import io.invertase.googlemobileads.common.ReactNativePreferences;
|
|
32
|
-
import java.util.HashMap;
|
|
33
|
-
import java.util.Map;
|
|
34
31
|
|
|
35
32
|
public class ReactNativeAppModule extends ReactNativeModule {
|
|
36
33
|
private static final String TAG = "RNAppModule";
|
|
@@ -150,29 +147,4 @@ public class ReactNativeAppModule extends ReactNativeModule {
|
|
|
150
147
|
ReactNativePreferences.getSharedInstance().clearAll();
|
|
151
148
|
promise.resolve(null);
|
|
152
149
|
}
|
|
153
|
-
|
|
154
|
-
@Override
|
|
155
|
-
public Map<String, Object> getConstants() {
|
|
156
|
-
Map<String, Object> constants = new HashMap<>();
|
|
157
|
-
// List<Map<String, Object>> appsList = new ArrayList<>();
|
|
158
|
-
// List<ReactNativeApp> reactNativeApps = ReactNativeApp.getApps(getReactApplicationContext());
|
|
159
|
-
|
|
160
|
-
// for (ReactNativeApp app : reactNativeApps) {
|
|
161
|
-
// appsList.add(RCTConvertFirebase.reactNativeAppToMap(app));
|
|
162
|
-
// }
|
|
163
|
-
|
|
164
|
-
// constants.put("NATIVE_FIREBASE_APPS", appsList);
|
|
165
|
-
|
|
166
|
-
// constants.put("FIREBASE_RAW_JSON", ReactNativeJSON.getSharedInstance().getRawJSON());
|
|
167
|
-
|
|
168
|
-
// Precision types in ad revenue events.
|
|
169
|
-
// See:
|
|
170
|
-
// https://developers.google.com/android/reference/com/google/android/gms/ads/AdValue.PrecisionType
|
|
171
|
-
constants.put("REVENUE_PRECISION_UNKNOWN", AdValue.PrecisionType.UNKNOWN);
|
|
172
|
-
constants.put("REVENUE_PRECISION_ESTIMATED", AdValue.PrecisionType.ESTIMATED);
|
|
173
|
-
constants.put("REVENUE_PRECISION_PUBLISHER_PROVIDED", AdValue.PrecisionType.PUBLISHER_PROVIDED);
|
|
174
|
-
constants.put("REVENUE_PRECISION_PRECISE", AdValue.PrecisionType.PRECISE);
|
|
175
|
-
|
|
176
|
-
return constants;
|
|
177
|
-
}
|
|
178
150
|
}
|
package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt
CHANGED
|
@@ -23,6 +23,7 @@ import com.google.android.gms.ads.initialization.OnInitializationCompleteListene
|
|
|
23
23
|
import com.google.android.gms.ads.RequestConfiguration
|
|
24
24
|
import com.google.android.gms.ads.AdInspectorError
|
|
25
25
|
import com.google.android.gms.ads.AdRequest
|
|
26
|
+
import com.google.android.gms.ads.AdValue;
|
|
26
27
|
import com.google.android.gms.ads.OnAdInspectorClosedListener
|
|
27
28
|
|
|
28
29
|
private const val SERVICE = "RNGoogleMobileAdsModule";
|
|
@@ -33,6 +34,18 @@ class ReactNativeGoogleMobileAdsModule(
|
|
|
33
34
|
|
|
34
35
|
override fun getName() = SERVICE
|
|
35
36
|
|
|
37
|
+
override fun getConstants(): Map<String, Any> {
|
|
38
|
+
return mapOf(
|
|
39
|
+
// Precision types in ad revenue events.
|
|
40
|
+
// See:
|
|
41
|
+
// https://developers.google.com/android/reference/com/google/android/gms/ads/AdValue.PrecisionType
|
|
42
|
+
"REVENUE_PRECISION_UNKNOWN" to AdValue.PrecisionType.UNKNOWN,
|
|
43
|
+
"REVENUE_PRECISION_ESTIMATED" to AdValue.PrecisionType.ESTIMATED,
|
|
44
|
+
"REVENUE_PRECISION_PUBLISHER_PROVIDED" to AdValue.PrecisionType.PUBLISHER_PROVIDED,
|
|
45
|
+
"REVENUE_PRECISION_PRECISE" to AdValue.PrecisionType.PRECISE
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
private fun buildRequestConfiguration(
|
|
37
50
|
requestConfiguration: ReadableMap
|
|
38
51
|
): RequestConfiguration {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//
|
|
2
1
|
/**
|
|
3
2
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
4
3
|
*
|
|
@@ -16,10 +15,22 @@
|
|
|
16
15
|
*
|
|
17
16
|
*/
|
|
18
17
|
|
|
18
|
+
#if !TARGET_OS_MACCATALYST
|
|
19
|
+
|
|
19
20
|
#import <Foundation/Foundation.h>
|
|
20
21
|
|
|
21
|
-
#
|
|
22
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
23
|
+
|
|
24
|
+
#import <RNGoogleMobileAdsSpec/RNGoogleMobileAdsSpec.h>
|
|
25
|
+
@interface RNGoogleMobileAdsConsentModule : NSObject <NativeConsentModuleSpec>
|
|
26
|
+
|
|
27
|
+
#else
|
|
22
28
|
|
|
29
|
+
#import <React/RCTBridgeModule.h>
|
|
23
30
|
@interface RNGoogleMobileAdsConsentModule : NSObject <RCTBridgeModule>
|
|
24
31
|
|
|
32
|
+
#endif
|
|
33
|
+
|
|
25
34
|
@end
|
|
35
|
+
|
|
36
|
+
#endif
|
package/ios/RNGoogleMobileAds/{RNGoogleMobileAdsConsentModule.m → RNGoogleMobileAdsConsentModule.mm}
RENAMED
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
#if !TARGET_OS_MACCATALYST
|
|
23
23
|
#include <UserMessagingPlatform/UserMessagingPlatform.h>
|
|
24
24
|
#endif
|
|
25
|
-
#
|
|
25
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
26
|
+
#import "RNGoogleMobileAdsSpec.h"
|
|
27
|
+
#endif
|
|
26
28
|
#import "RNGoogleMobileAdsConsentModule.h"
|
|
27
29
|
#import "common/RNSharedUtils.h"
|
|
28
30
|
|
|
@@ -92,7 +94,8 @@ RCT_EXPORT_METHOD(requestInfoUpdate
|
|
|
92
94
|
UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init];
|
|
93
95
|
UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];
|
|
94
96
|
|
|
95
|
-
debugSettings.geography =
|
|
97
|
+
debugSettings.geography =
|
|
98
|
+
(UMPDebugGeography)([options[@"debugGeography"] integerValue] ?: UMPDebugGeographyDisabled);
|
|
96
99
|
debugSettings.testDeviceIdentifiers =
|
|
97
100
|
[options valueForKeyPath:@"testDeviceIdentifiers"] ?: [[NSMutableArray alloc] init];
|
|
98
101
|
|
|
@@ -117,6 +120,105 @@ RCT_EXPORT_METHOD(requestInfoUpdate
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
RCT_EXPORT_METHOD(showForm : (RCTPromiseResolveBlock)resolve : (RCTPromiseRejectBlock)reject) {
|
|
123
|
+
[self showForm:resolve reject:reject];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
RCT_EXPORT_METHOD(showPrivacyOptionsForm
|
|
127
|
+
: (RCTPromiseResolveBlock)resolve
|
|
128
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
129
|
+
[self showPrivacyOptionsForm:resolve reject:reject];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
RCT_EXPORT_METHOD(loadAndShowConsentFormIfRequired
|
|
133
|
+
: (RCTPromiseResolveBlock)resolve
|
|
134
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
135
|
+
[self loadAndShowConsentFormIfRequired:resolve reject:reject];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
RCT_EXPORT_METHOD(reset) {
|
|
139
|
+
#if !TARGET_OS_MACCATALYST
|
|
140
|
+
[UMPConsentInformation.sharedInstance reset];
|
|
141
|
+
#endif
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
RCT_EXPORT_METHOD(getConsentInfo
|
|
145
|
+
: (RCTPromiseResolveBlock)resolve
|
|
146
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
147
|
+
[self getConsentInfo:resolve reject:reject];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
RCT_EXPORT_METHOD(getTCString : (RCTPromiseResolveBlock)resolve : (RCTPromiseRejectBlock)reject) {
|
|
151
|
+
[self getTCString:resolve reject:reject];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
RCT_EXPORT_METHOD(getGdprApplies
|
|
155
|
+
: (RCTPromiseResolveBlock)resolve
|
|
156
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
157
|
+
[self getGdprApplies:resolve reject:reject];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
RCT_EXPORT_METHOD(getPurposeConsents
|
|
161
|
+
: (RCTPromiseResolveBlock)resolve
|
|
162
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
163
|
+
[self getPurposeConsents:resolve reject:reject];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
RCT_EXPORT_METHOD(getPurposeLegitimateInterests
|
|
167
|
+
: (RCTPromiseResolveBlock)resolve
|
|
168
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
169
|
+
[self getPurposeLegitimateInterests:resolve reject:reject];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
173
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
174
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
175
|
+
return std::make_shared<facebook::react::NativeConsentModuleSpecJSI>(params);
|
|
176
|
+
}
|
|
177
|
+
#endif
|
|
178
|
+
|
|
179
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
180
|
+
- (void)requestInfoUpdate:(JS::NativeConsentModule::AdsConsentInfoOptions &)options
|
|
181
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
182
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
183
|
+
#if !TARGET_OS_MACCATALYST
|
|
184
|
+
UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init];
|
|
185
|
+
UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];
|
|
186
|
+
|
|
187
|
+
debugSettings.geography =
|
|
188
|
+
static_cast<UMPDebugGeography>(options.debugGeography().value_or(UMPDebugGeographyDisabled));
|
|
189
|
+
debugSettings.testDeviceIdentifiers = options.testDeviceIdentifiers().has_value()
|
|
190
|
+
? ^{
|
|
191
|
+
NSMutableArray *array = [[NSMutableArray alloc] init];
|
|
192
|
+
FB::LazyVector<NSString *, id> identifiers = options.testDeviceIdentifiers().value();
|
|
193
|
+
for (NSUInteger i = 0; i < identifiers.size(); i++) {
|
|
194
|
+
[array addObject:identifiers[i]]; // Direct access by index
|
|
195
|
+
}
|
|
196
|
+
return array;
|
|
197
|
+
}()
|
|
198
|
+
: [[NSMutableArray alloc] init];
|
|
199
|
+
|
|
200
|
+
parameters.debugSettings = debugSettings;
|
|
201
|
+
parameters.tagForUnderAgeOfConsent = options.tagForUnderAgeOfConsent().value_or(FALSE);
|
|
202
|
+
|
|
203
|
+
[UMPConsentInformation.sharedInstance
|
|
204
|
+
requestConsentInfoUpdateWithParameters:parameters
|
|
205
|
+
completionHandler:^(NSError *_Nullable error) {
|
|
206
|
+
if (error) {
|
|
207
|
+
[RNSharedUtils
|
|
208
|
+
rejectPromiseWithUserInfo:reject
|
|
209
|
+
userInfo:[@{
|
|
210
|
+
@"code" : @"consent-update-failed",
|
|
211
|
+
@"message" : error.localizedDescription,
|
|
212
|
+
} mutableCopy]];
|
|
213
|
+
} else {
|
|
214
|
+
resolve([self getConsentInformation]);
|
|
215
|
+
}
|
|
216
|
+
}];
|
|
217
|
+
#endif
|
|
218
|
+
}
|
|
219
|
+
#endif
|
|
220
|
+
|
|
221
|
+
- (void)showForm:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
120
222
|
#if !TARGET_OS_MACCATALYST
|
|
121
223
|
[UMPConsentForm loadWithCompletionHandler:^(UMPConsentForm *form, NSError *loadError) {
|
|
122
224
|
if (loadError) {
|
|
@@ -145,9 +247,8 @@ RCT_EXPORT_METHOD(showForm : (RCTPromiseResolveBlock)resolve : (RCTPromiseReject
|
|
|
145
247
|
#endif
|
|
146
248
|
}
|
|
147
249
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
250
|
+
- (void)showPrivacyOptionsForm:(RCTPromiseResolveBlock)resolve
|
|
251
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
151
252
|
#if !TARGET_OS_MACCATALYST
|
|
152
253
|
[UMPConsentForm
|
|
153
254
|
presentPrivacyOptionsFormFromViewController:[UIApplication sharedApplication]
|
|
@@ -168,9 +269,8 @@ RCT_EXPORT_METHOD(showPrivacyOptionsForm
|
|
|
168
269
|
#endif
|
|
169
270
|
}
|
|
170
271
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
272
|
+
- (void)loadAndShowConsentFormIfRequired:(RCTPromiseResolveBlock)resolve
|
|
273
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
174
274
|
#if !TARGET_OS_MACCATALYST
|
|
175
275
|
[UMPConsentForm
|
|
176
276
|
loadAndPresentIfRequiredFromViewController:[UIApplication sharedApplication]
|
|
@@ -191,21 +291,13 @@ RCT_EXPORT_METHOD(loadAndShowConsentFormIfRequired
|
|
|
191
291
|
#endif
|
|
192
292
|
}
|
|
193
293
|
|
|
194
|
-
|
|
195
|
-
#if !TARGET_OS_MACCATALYST
|
|
196
|
-
[UMPConsentInformation.sharedInstance reset];
|
|
197
|
-
#endif
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
RCT_EXPORT_METHOD(getConsentInfo
|
|
201
|
-
: (RCTPromiseResolveBlock)resolve
|
|
202
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
294
|
+
- (void)getConsentInfo:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
203
295
|
#if !TARGET_OS_MACCATALYST
|
|
204
296
|
resolve([self getConsentInformation]);
|
|
205
297
|
#endif
|
|
206
298
|
}
|
|
207
299
|
|
|
208
|
-
|
|
300
|
+
- (void)getTCString:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
209
301
|
@try {
|
|
210
302
|
// https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details
|
|
211
303
|
NSString *tcString = [[NSUserDefaults standardUserDefaults] objectForKey:@"IABTCF_TCString"];
|
|
@@ -219,9 +311,7 @@ RCT_EXPORT_METHOD(getTCString : (RCTPromiseResolveBlock)resolve : (RCTPromiseRej
|
|
|
219
311
|
}
|
|
220
312
|
}
|
|
221
313
|
|
|
222
|
-
|
|
223
|
-
: (RCTPromiseResolveBlock)resolve
|
|
224
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
314
|
+
- (void)getGdprApplies:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
225
315
|
@try {
|
|
226
316
|
BOOL gdprApplies = [[NSUserDefaults standardUserDefaults] boolForKey:@"IABTCF_gdprApplies"];
|
|
227
317
|
resolve(@(gdprApplies));
|
|
@@ -234,9 +324,7 @@ RCT_EXPORT_METHOD(getGdprApplies
|
|
|
234
324
|
}
|
|
235
325
|
}
|
|
236
326
|
|
|
237
|
-
|
|
238
|
-
: (RCTPromiseResolveBlock)resolve
|
|
239
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
327
|
+
- (void)getPurposeConsents:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
|
|
240
328
|
@try {
|
|
241
329
|
NSString *purposeConsents =
|
|
242
330
|
[[NSUserDefaults standardUserDefaults] stringForKey:@"IABTCF_PurposeConsents"];
|
|
@@ -250,9 +338,8 @@ RCT_EXPORT_METHOD(getPurposeConsents
|
|
|
250
338
|
}
|
|
251
339
|
}
|
|
252
340
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
341
|
+
- (void)getPurposeLegitimateInterests:(RCTPromiseResolveBlock)resolve
|
|
342
|
+
reject:(RCTPromiseRejectBlock)reject {
|
|
256
343
|
@try {
|
|
257
344
|
NSString *purposeLegitimateInterests =
|
|
258
345
|
[[NSUserDefaults standardUserDefaults] stringForKey:@"IABTCF_PurposeLegitimateInterests"];
|
|
@@ -175,4 +175,21 @@ RCT_EXPORT_METHOD(setAppMuted : (BOOL *)muted) {
|
|
|
175
175
|
#endif
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
- (NSDictionary *)constantsToExport {
|
|
179
|
+
return @{
|
|
180
|
+
// Precision types in ad revenue events.
|
|
181
|
+
// See: https://developers.google.com/admob/ios/impression-level-ad-revenue#objective-c
|
|
182
|
+
#if !TARGET_OS_MACCATALYST
|
|
183
|
+
@"REVENUE_PRECISION_UNKNOWN" : @(GADAdValuePrecisionUnknown),
|
|
184
|
+
@"REVENUE_PRECISION_ESTIMATED" : @(GADAdValuePrecisionEstimated),
|
|
185
|
+
@"REVENUE_PRECISION_PUBLISHER_PROVIDED" : @(GADAdValuePrecisionPublisherProvided),
|
|
186
|
+
@"REVENUE_PRECISION_PRECISE" : @(GADAdValuePrecisionPrecise)
|
|
187
|
+
};
|
|
188
|
+
#endif
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
- (NSDictionary *)getConstants {
|
|
192
|
+
return [self constantsToExport];
|
|
193
|
+
}
|
|
194
|
+
|
|
178
195
|
@end
|
|
@@ -17,14 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
#import <React/RCTUtils.h>
|
|
19
19
|
|
|
20
|
-
#if !TARGET_OS_MACCATALYST
|
|
21
|
-
#import <GoogleMobileAds/GoogleMobileAds.h>
|
|
22
|
-
#endif
|
|
23
|
-
|
|
24
20
|
#import "RNAppModule.h"
|
|
25
|
-
#import "RNJSON.h"
|
|
26
|
-
#import "RNMeta.h"
|
|
27
|
-
#import "RNPreferences.h"
|
|
28
21
|
#import "RNRCTEventEmitter.h"
|
|
29
22
|
#import "RNSharedUtils.h"
|
|
30
23
|
|
|
@@ -55,58 +48,6 @@ RCT_EXPORT_MODULE();
|
|
|
55
48
|
[[RNRCTEventEmitter shared] invalidate];
|
|
56
49
|
}
|
|
57
50
|
|
|
58
|
-
#pragma mark -
|
|
59
|
-
#pragma mark META Methods
|
|
60
|
-
|
|
61
|
-
RCT_EXPORT_METHOD(metaGetAll
|
|
62
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
63
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
64
|
-
resolve([RNMeta getAll]);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
#pragma mark -
|
|
68
|
-
#pragma mark JSON Methods
|
|
69
|
-
|
|
70
|
-
RCT_EXPORT_METHOD(jsonGetAll
|
|
71
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
72
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
73
|
-
resolve([[RNJSON shared] getAll]);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
#pragma mark -
|
|
77
|
-
#pragma mark Preference Methods
|
|
78
|
-
|
|
79
|
-
RCT_EXPORT_METHOD(preferencesSetBool
|
|
80
|
-
: (NSString *)key boolValue
|
|
81
|
-
: (BOOL)boolValue resolver
|
|
82
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
83
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
84
|
-
[[RNPreferences shared] setBooleanValue:key boolValue:boolValue];
|
|
85
|
-
resolve([NSNull null]);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
RCT_EXPORT_METHOD(preferencesSetString
|
|
89
|
-
: (NSString *)key stringValue
|
|
90
|
-
: (NSString *)stringValue resolver
|
|
91
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
92
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
93
|
-
[[RNPreferences shared] setStringValue:key stringValue:stringValue];
|
|
94
|
-
resolve([NSNull null]);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
RCT_EXPORT_METHOD(preferencesGetAll
|
|
98
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
99
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
100
|
-
resolve([[RNPreferences shared] getAll]);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
RCT_EXPORT_METHOD(preferencesClearAll
|
|
104
|
-
: (RCTPromiseResolveBlock)resolve rejecter
|
|
105
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
106
|
-
[[RNPreferences shared] clearAll];
|
|
107
|
-
resolve([NSNull null]);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
51
|
#pragma mark -
|
|
111
52
|
#pragma mark Event Methods
|
|
112
53
|
|
|
@@ -148,23 +89,6 @@ RCT_EXPORT_METHOD(removeListeners : (NSInteger)count) {
|
|
|
148
89
|
// Keep: Required for RN built in Event Emitter Calls.
|
|
149
90
|
}
|
|
150
91
|
|
|
151
|
-
- (NSDictionary *)constantsToExport {
|
|
152
|
-
NSMutableDictionary *constants = [NSMutableDictionary new];
|
|
153
|
-
|
|
154
|
-
constants[@"ADMOB_RAW_JSON"] = [[RNJSON shared] getRawJSON];
|
|
155
|
-
|
|
156
|
-
// Precision types in ad revenue events.
|
|
157
|
-
// See: https://developers.google.com/admob/ios/impression-level-ad-revenue#objective-c
|
|
158
|
-
#if !TARGET_OS_MACCATALYST
|
|
159
|
-
constants[@"REVENUE_PRECISION_UNKNOWN"] = @(GADAdValuePrecisionUnknown);
|
|
160
|
-
constants[@"REVENUE_PRECISION_ESTIMATED"] = @(GADAdValuePrecisionEstimated);
|
|
161
|
-
constants[@"REVENUE_PRECISION_PUBLISHER_PROVIDED"] = @(GADAdValuePrecisionPublisherProvided);
|
|
162
|
-
constants[@"REVENUE_PRECISION_PRECISE"] = @(GADAdValuePrecisionPrecise);
|
|
163
|
-
#endif
|
|
164
|
-
|
|
165
|
-
return constants;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
92
|
+ (BOOL)requiresMainQueueSetup {
|
|
169
93
|
return YES;
|
|
170
94
|
}
|
|
@@ -36,13 +36,9 @@
|
|
|
36
36
|
#pragma mark -
|
|
37
37
|
#pragma mark Methods
|
|
38
38
|
|
|
39
|
-
+ (void)sendJSEvent:name:(NSString *)name body:(NSDictionary *)body;
|
|
40
|
-
|
|
41
39
|
+ (void)rejectPromiseWithUserInfo:(RCTPromiseRejectBlock)reject
|
|
42
40
|
userInfo:(NSMutableDictionary *)userInfo;
|
|
43
41
|
|
|
44
|
-
+ (NSString *)getISO8601String:(NSDate *)date;
|
|
45
|
-
|
|
46
42
|
@end
|
|
47
43
|
|
|
48
44
|
#endif
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
#import "RNSharedUtils.h"
|
|
19
|
-
#import "RNRCTEventEmitter.h"
|
|
20
19
|
|
|
21
20
|
#pragma mark -
|
|
22
21
|
#pragma mark Constants
|
|
@@ -33,24 +32,4 @@ static NSString *const RNErrorDomain = @"RNErrorDomain";
|
|
|
33
32
|
reject(userInfo[@"code"], userInfo[@"message"], error);
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
+ (void)sendJSEvent:name:(NSString *)name body:(NSDictionary *)body {
|
|
37
|
-
NSMutableDictionary *newBody = [body mutableCopy];
|
|
38
|
-
[[RNRCTEventEmitter shared] sendEventWithName:name body:newBody];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
+ (NSString *)getISO8601String:(NSDate *)date {
|
|
42
|
-
static NSDateFormatter *formatter = nil;
|
|
43
|
-
|
|
44
|
-
if (!formatter) {
|
|
45
|
-
formatter = [[NSDateFormatter alloc] init];
|
|
46
|
-
[formatter setLocale:[NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]];
|
|
47
|
-
formatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
|
|
48
|
-
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
NSString *iso8601String = [formatter stringFromDate:date];
|
|
52
|
-
|
|
53
|
-
return [iso8601String stringByAppendingString:@"Z"];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
35
|
@end
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.AdsConsent = void 0;
|
|
7
7
|
var _core = require("@iabtcf/core");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _AdsConsentDebugGeography = require("./AdsConsentDebugGeography");
|
|
10
8
|
var _AdsConsentPurposes = require("./AdsConsentPurposes");
|
|
11
9
|
var _AdsConsentSpecialFeatures = require("./AdsConsentSpecialFeatures");
|
|
12
10
|
var _common = require("./common");
|
|
11
|
+
var _NativeConsentModule = _interopRequireWildcard(require("./specs/modules/NativeConsentModule"));
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
14
|
/*
|
|
14
15
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
15
16
|
*
|
|
@@ -27,13 +28,12 @@ var _common = require("./common");
|
|
|
27
28
|
*
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
|
-
const native = _reactNative.NativeModules.RNGoogleMobileAdsConsentModule;
|
|
31
31
|
const AdsConsent = exports.AdsConsent = {
|
|
32
32
|
requestInfoUpdate(options = {}) {
|
|
33
33
|
if (!(0, _common.isObject)(options)) {
|
|
34
34
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options' expected an object value.");
|
|
35
35
|
}
|
|
36
|
-
if ((0, _common.isPropertySet)(options, 'debugGeography') && options.debugGeography !==
|
|
36
|
+
if ((0, _common.isPropertySet)(options, 'debugGeography') && options.debugGeography !== _NativeConsentModule.AdsConsentDebugGeography.DISABLED && options.debugGeography !== _NativeConsentModule.AdsConsentDebugGeography.EEA && options.debugGeography !== _NativeConsentModule.AdsConsentDebugGeography.NOT_EEA) {
|
|
37
37
|
throw new Error("AdsConsent.requestInfoUpdate(*) 'options.debugGeography' expected one of AdsConsentDebugGeography.DISABLED, AdsConsentDebugGeography.EEA or AdsConsentDebugGeography.NOT_EEA.");
|
|
38
38
|
}
|
|
39
39
|
if ((0, _common.isPropertySet)(options, 'tagForUnderAgeOfConsent') && !(0, _common.isBoolean)(options.tagForUnderAgeOfConsent)) {
|
|
@@ -49,45 +49,45 @@ const AdsConsent = exports.AdsConsent = {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return _NativeConsentModule.default.requestInfoUpdate(options);
|
|
53
53
|
},
|
|
54
54
|
showForm() {
|
|
55
|
-
return
|
|
55
|
+
return _NativeConsentModule.default.showForm();
|
|
56
56
|
},
|
|
57
57
|
showPrivacyOptionsForm() {
|
|
58
|
-
return
|
|
58
|
+
return _NativeConsentModule.default.showPrivacyOptionsForm();
|
|
59
59
|
},
|
|
60
60
|
loadAndShowConsentFormIfRequired() {
|
|
61
|
-
return
|
|
61
|
+
return _NativeConsentModule.default.loadAndShowConsentFormIfRequired();
|
|
62
62
|
},
|
|
63
63
|
getConsentInfo() {
|
|
64
|
-
return
|
|
64
|
+
return _NativeConsentModule.default.getConsentInfo();
|
|
65
65
|
},
|
|
66
66
|
async gatherConsent(options = {}) {
|
|
67
67
|
await this.requestInfoUpdate(options);
|
|
68
68
|
return this.loadAndShowConsentFormIfRequired();
|
|
69
69
|
},
|
|
70
70
|
reset() {
|
|
71
|
-
return
|
|
71
|
+
return _NativeConsentModule.default.reset();
|
|
72
72
|
},
|
|
73
73
|
getTCString() {
|
|
74
|
-
return
|
|
74
|
+
return _NativeConsentModule.default.getTCString();
|
|
75
75
|
},
|
|
76
76
|
async getTCModel() {
|
|
77
|
-
const tcString = await
|
|
77
|
+
const tcString = await _NativeConsentModule.default.getTCString();
|
|
78
78
|
return _core.TCString.decode(tcString);
|
|
79
79
|
},
|
|
80
80
|
getGdprApplies() {
|
|
81
|
-
return
|
|
81
|
+
return _NativeConsentModule.default.getGdprApplies();
|
|
82
82
|
},
|
|
83
83
|
getPurposeConsents() {
|
|
84
|
-
return
|
|
84
|
+
return _NativeConsentModule.default.getPurposeConsents();
|
|
85
85
|
},
|
|
86
86
|
getPurposeLegitimateInterests() {
|
|
87
|
-
return
|
|
87
|
+
return _NativeConsentModule.default.getPurposeLegitimateInterests();
|
|
88
88
|
},
|
|
89
89
|
async getUserChoices() {
|
|
90
|
-
const tcString = await
|
|
90
|
+
const tcString = await _NativeConsentModule.default.getTCString();
|
|
91
91
|
let tcModel;
|
|
92
92
|
try {
|
|
93
93
|
tcModel = _core.TCString.decode(tcString);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","
|
|
1
|
+
{"version":3,"names":["_core","require","_AdsConsentPurposes","_AdsConsentSpecialFeatures","_common","_NativeConsentModule","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AdsConsent","exports","requestInfoUpdate","options","isObject","Error","isPropertySet","debugGeography","AdsConsentDebugGeography","DISABLED","EEA","NOT_EEA","isBoolean","tagForUnderAgeOfConsent","isArray","testDeviceIdentifiers","deviceId","isString","native","showForm","showPrivacyOptionsForm","loadAndShowConsentFormIfRequired","getConsentInfo","gatherConsent","reset","getTCString","getTCModel","tcString","TCString","decode","getGdprApplies","getPurposeConsents","getPurposeLegitimateInterests","getUserChoices","tcModel","TCModel","__DEV__","console","warn","activelyScanDeviceCharacteristicsForIdentification","specialFeatureOptins","AdsConsentSpecialFeatures","ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION","applyMarketResearchToGenerateAudienceInsights","purposeConsents","AdsConsentPurposes","APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS","createAPersonalisedAdsProfile","CREATE_A_PERSONALISED_ADS_PROFILE","createAPersonalisedContentProfile","CREATE_A_PERSONALISED_CONTENT_PROFILE","developAndImproveProducts","DEVELOP_AND_IMPROVE_PRODUCTS","measureAdPerformance","MEASURE_AD_PERFORMANCE","measureContentPerformance","MEASURE_CONTENT_PERFORMANCE","selectBasicAds","SELECT_BASIC_ADS","selectPersonalisedAds","SELECT_PERSONALISED_ADS","selectPersonalisedContent","SELECT_PERSONALISED_CONTENT","storeAndAccessInformationOnDevice","STORE_AND_ACCESS_INFORMATION_ON_DEVICE","usePreciseGeolocationData","USE_PRECISE_GEOLOCATION_DATA"],"sourceRoot":"../../src","sources":["AdsConsent.ts"],"mappings":";;;;;;AAiBA,IAAAA,K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EAAE/B,OAAO,CAACM,oBAAoB,CAACrD,GAAG,CACzDsD,oDAAyB,CAACyB,4BAC5B;IACF,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
|
@@ -4,14 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.RevenuePrecisions = void 0;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var _NativeGoogleMobileAdsModule = _interopRequireDefault(require("../specs/modules/NativeGoogleMobileAdsModule"));
|
|
8
|
+
var _RNGoogleMobileAdsMod;
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
10
|
const {
|
|
10
11
|
REVENUE_PRECISION_ESTIMATED,
|
|
11
12
|
REVENUE_PRECISION_PRECISE,
|
|
12
13
|
REVENUE_PRECISION_PUBLISHER_PROVIDED,
|
|
13
14
|
REVENUE_PRECISION_UNKNOWN
|
|
14
|
-
} = ((
|
|
15
|
+
} = ((_RNGoogleMobileAdsMod = _NativeGoogleMobileAdsModule.default.getConstants) === null || _RNGoogleMobileAdsMod === void 0 ? void 0 : _RNGoogleMobileAdsMod.call(_NativeGoogleMobileAdsModule.default)) ?? {};
|
|
15
16
|
let RevenuePrecisions = exports.RevenuePrecisions = /*#__PURE__*/function (RevenuePrecisions) {
|
|
16
17
|
RevenuePrecisions[RevenuePrecisions["ESTIMATED"] = REVENUE_PRECISION_ESTIMATED] = "ESTIMATED";
|
|
17
18
|
RevenuePrecisions[RevenuePrecisions["PRECISE"] = REVENUE_PRECISION_PRECISE] = "PRECISE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_NativeGoogleMobileAdsModule","_interopRequireDefault","require","_RNGoogleMobileAdsMod","e","__esModule","default","REVENUE_PRECISION_ESTIMATED","REVENUE_PRECISION_PRECISE","REVENUE_PRECISION_PUBLISHER_PROVIDED","REVENUE_PRECISION_UNKNOWN","RNGoogleMobileAdsModule","getConstants","call","RevenuePrecisions","exports"],"sourceRoot":"../../../src","sources":["common/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,4BAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmF,IAAAC,qBAAA;AAAA,SAAAF,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnF,MAAM;EACJG,2BAA2B;EAC3BC,yBAAyB;EACzBC,oCAAoC;EACpCC;AACF,CAAC,GAAG,EAAAP,qBAAA,GAAAQ,oCAAuB,CAACC,YAAY,cAAAT,qBAAA,uBAApCA,qBAAA,CAAAU,IAAA,CAAAF,oCAAuC,CAAC,KAAI,CAAC,CAAC;AAAC,IAEvCG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB,gBACfP,2BAA2B;EAD7BO,iBAAiB,CAAjBA,iBAAiB,cAEjBN,yBAAyB;EAFzBM,iBAAiB,CAAjBA,iBAAiB,yBAGNL,oCAAoC;EAH/CK,iBAAiB,CAAjBA,iBAAiB,cAIjBJ,yBAAyB;EAAA,OAJzBI,iBAAiB;AAAA","ignoreList":[]}
|