cloudx-react-native 2.2.3 → 3.2.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 +65 -17
- package/android/build.gradle +1 -2
- package/android/src/main/java/com/cloudxreactnative/CloudXModuleImpl.kt +74 -40
- package/android/src/newarch/com/cloudxreactnative/CloudXModule.kt +3 -0
- package/android/src/oldarch/com/cloudxreactnative/CloudXModule.kt +19 -0
- package/cloudx-react-native.podspec +1 -1
- package/ios/CloudX.mm +156 -12
- package/lib/commonjs/CloudX.js +11 -3
- package/lib/commonjs/CloudX.js.map +1 -1
- package/lib/commonjs/CloudXErrorCode.js +4 -0
- package/lib/commonjs/CloudXErrorCode.js.map +1 -1
- package/lib/commonjs/specs/NativeCloudX.js.map +1 -1
- package/lib/commonjs/version.js +10 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/CloudX.js +11 -3
- package/lib/module/CloudX.js.map +1 -1
- package/lib/module/CloudXErrorCode.js +4 -0
- package/lib/module/CloudXErrorCode.js.map +1 -1
- package/lib/module/specs/NativeCloudX.js.map +1 -1
- package/lib/module/version.js +4 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/src/CloudX.d.ts.map +1 -1
- package/lib/typescript/src/CloudXErrorCode.d.ts +5 -1
- package/lib/typescript/src/CloudXErrorCode.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeCloudX.d.ts +2 -0
- package/lib/typescript/src/specs/NativeCloudX.d.ts.map +1 -1
- package/lib/typescript/src/types/CloudX.d.ts +16 -0
- package/lib/typescript/src/types/CloudX.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +2 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/package.json +1 -7
- package/src/CloudX.ts +12 -3
- package/src/CloudXErrorCode.ts +6 -0
- package/src/specs/NativeCloudX.ts +7 -0
- package/src/types/CloudX.ts +18 -0
- package/src/version.ts +3 -0
package/README.md
CHANGED
|
@@ -11,10 +11,18 @@ The CloudX React Native SDK enables monetization of your React Native apps with
|
|
|
11
11
|
- **All Ad Formats**: Banner, MREC, Interstitial, and Rewarded ads
|
|
12
12
|
- **Programmatic Ad APIs**: Overlay APIs for banner and MREC, plus fullscreen formats
|
|
13
13
|
- **React Hooks**: Declarative hooks for fullscreen and banner ad lifecycles
|
|
14
|
-
- **Privacy Compliance**: IAB privacy handled automatically via CMP shared storage
|
|
14
|
+
- **Privacy Compliance**: IAB privacy handled automatically via CMP shared storage, plus manual `setHasUserConsent` / `setDoNotSell` overrides
|
|
15
15
|
- **App Tracking Transparency**: Built-in ATT support for iOS 14+
|
|
16
16
|
- **Type Safety**: Full TypeScript definitions with CloudX-prefixed namespace
|
|
17
17
|
|
|
18
|
+
### Native SDK Versions
|
|
19
|
+
|
|
20
|
+
| Plugin | iOS (`CloudXCore`) | Android (`io.cloudx:sdk`) |
|
|
21
|
+
|--------|-------------------|---------------------------|
|
|
22
|
+
| 3.2.0 | 3.2.0 | 3.2.0 |
|
|
23
|
+
| 3.1.2 | 3.1.0 | 3.1.0 |
|
|
24
|
+
| 2.2.3 | 2.2.3 | 2.2.3 |
|
|
25
|
+
|
|
18
26
|
## Installation
|
|
19
27
|
|
|
20
28
|
Requires React Native 0.70+, React 18.0+, iOS 13.0+, and Android API 23+.
|
|
@@ -32,10 +40,13 @@ target 'YourApp' do
|
|
|
32
40
|
# ... existing config ...
|
|
33
41
|
|
|
34
42
|
# CloudX ad network adapters (add as needed)
|
|
35
|
-
pod 'CloudXMetaAdapter', '~>
|
|
36
|
-
pod 'CloudXVungleAdapter', '~>
|
|
37
|
-
pod 'CloudXInMobiAdapter', '~>
|
|
38
|
-
pod '
|
|
43
|
+
pod 'CloudXMetaAdapter', '~> 3.2.0'
|
|
44
|
+
pod 'CloudXVungleAdapter', '~> 3.2.0'
|
|
45
|
+
pod 'CloudXInMobiAdapter', '~> 3.2.0'
|
|
46
|
+
pod 'CloudXMintegralAdapter', '~> 3.2.0'
|
|
47
|
+
pod 'CloudXUnityAdsAdapter', '~> 3.2.0'
|
|
48
|
+
pod 'CloudXMagniteAdapter', '~> 3.2.0'
|
|
49
|
+
pod 'CloudXRenderer', '~> 3.2.0'
|
|
39
50
|
end
|
|
40
51
|
```
|
|
41
52
|
|
|
@@ -66,18 +77,33 @@ Add CloudX SDK and adapter dependencies to your `android/app/build.gradle`:
|
|
|
66
77
|
```kotlin
|
|
67
78
|
dependencies {
|
|
68
79
|
// CloudX Android SDK
|
|
69
|
-
implementation "io.cloudx:sdk:
|
|
80
|
+
implementation "io.cloudx:sdk:3.2.0"
|
|
70
81
|
|
|
71
82
|
// Adapters for ad networks (add as needed)
|
|
72
|
-
implementation "io.cloudx:adapter-
|
|
73
|
-
implementation "io.cloudx:adapter-
|
|
74
|
-
implementation "io.cloudx:adapter-
|
|
75
|
-
implementation "io.cloudx:adapter-
|
|
83
|
+
implementation "io.cloudx:adapter-meta:3.2.0"
|
|
84
|
+
implementation "io.cloudx:adapter-vungle:3.2.0"
|
|
85
|
+
implementation "io.cloudx:adapter-inmobi:3.2.0"
|
|
86
|
+
implementation "io.cloudx:adapter-mintegral:3.2.0"
|
|
87
|
+
implementation "io.cloudx:adapter-unityads:3.2.0"
|
|
88
|
+
implementation "io.cloudx:adapter-magnite:3.2.0"
|
|
89
|
+
|
|
90
|
+
// Required by the native SDK 3.2.0 when using the Meta adapter.
|
|
91
|
+
implementation "com.facebook.android:audience-network-sdk:6.21.0"
|
|
76
92
|
}
|
|
77
93
|
```
|
|
78
94
|
|
|
79
95
|
> **Note:** At least one adapter is required for the SDK to serve ads.
|
|
80
96
|
|
|
97
|
+
If you integrate the Mintegral adapter, also declare its Maven repository in `android/build.gradle` (Mintegral is not on Maven Central):
|
|
98
|
+
|
|
99
|
+
```kotlin
|
|
100
|
+
allprojects {
|
|
101
|
+
repositories {
|
|
102
|
+
maven { url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
81
107
|
## Initialization
|
|
82
108
|
|
|
83
109
|
Initialize the SDK before loading any ads:
|
|
@@ -535,6 +561,26 @@ CloudX.setAppKeyValue('app_version', '1.0.0');
|
|
|
535
561
|
CloudX.clearAllKeyValues();
|
|
536
562
|
```
|
|
537
563
|
|
|
564
|
+
### Manual Privacy Overrides
|
|
565
|
+
|
|
566
|
+
In most cases, IAB privacy signals (TCF, US Privacy String) are read automatically from shared `NSUserDefaults` / `SharedPreferences` written by your CMP. Use the manual APIs only when you need to override a CMP-provided value or when you don't use a CMP:
|
|
567
|
+
|
|
568
|
+
```typescript
|
|
569
|
+
import { CloudX } from 'cloudx-react-native';
|
|
570
|
+
|
|
571
|
+
// GDPR: user has granted consent
|
|
572
|
+
CloudX.setHasUserConsent(true);
|
|
573
|
+
|
|
574
|
+
// CCPA / US Privacy: user opted out of sale
|
|
575
|
+
CloudX.setDoNotSell(true);
|
|
576
|
+
|
|
577
|
+
// Clear a previously set override (fall back to CMP signal)
|
|
578
|
+
CloudX.setHasUserConsent(null);
|
|
579
|
+
CloudX.setDoNotSell(null);
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
Call these before `CloudX.initialize()` so the value is available before the first auction.
|
|
583
|
+
|
|
538
584
|
### App Tracking Transparency (iOS)
|
|
539
585
|
|
|
540
586
|
```typescript
|
|
@@ -594,12 +640,12 @@ CloudX.setVisualDebuggingEnabled(true);
|
|
|
594
640
|
- Xcode 14.0+ / CocoaPods (iOS)
|
|
595
641
|
- Gradle 8.0+ / Kotlin 1.8+ (Android)
|
|
596
642
|
|
|
597
|
-
### Native SDK Versions (
|
|
643
|
+
### Native SDK Versions (3.2.0)
|
|
598
644
|
|
|
599
645
|
| Platform | Dependency | Version |
|
|
600
646
|
|----------|-----------|---------|
|
|
601
|
-
| iOS | CloudXCore | ~>
|
|
602
|
-
| Android | io.cloudx:sdk |
|
|
647
|
+
| iOS | CloudXCore | ~> 3.2.0 |
|
|
648
|
+
| Android | io.cloudx:sdk | 3.2.0 |
|
|
603
649
|
|
|
604
650
|
## Troubleshooting
|
|
605
651
|
|
|
@@ -611,7 +657,12 @@ React Native 0.84.0 has a known issue where `TurboModuleRegistry.getEnforcing(..
|
|
|
611
657
|
|
|
612
658
|
This is a React Native framework bug, not a CloudX SDK issue. It manifests as a red screen crash on app launch:
|
|
613
659
|
|
|
614
|
-
|
|
660
|
+
```
|
|
661
|
+
TurboModuleRegistry.getEnforcing(...):
|
|
662
|
+
'PlatformConstants' could not be found. Verify
|
|
663
|
+
that a module by this name is registered in
|
|
664
|
+
the native binary.
|
|
665
|
+
```
|
|
615
666
|
|
|
616
667
|
**Workaround:** Use React Native 0.83.x or wait for the fix in a later 0.84.x patch release. The CloudX SDK is fully compatible with RN 0.70 through 0.83.
|
|
617
668
|
|
|
@@ -624,9 +675,6 @@ This is a React Native framework bug, not a CloudX SDK issue. It manifests as a
|
|
|
624
675
|
|
|
625
676
|
For support, contact mobile@cloudx.io
|
|
626
677
|
|
|
627
|
-
- Email: mobile@cloudx.io
|
|
628
|
-
- Issues: [GitHub Issues](https://github.com/cloudx-io/cloudx-react-native/issues)
|
|
629
|
-
|
|
630
678
|
## License
|
|
631
679
|
|
|
632
680
|
This project is licensed under the Elastic License 2.0 — see the [LICENSE](LICENSE) file for details.
|
package/android/build.gradle
CHANGED
|
@@ -65,7 +65,6 @@ android {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
repositories {
|
|
68
|
-
mavenLocal()
|
|
69
68
|
mavenCentral()
|
|
70
69
|
google()
|
|
71
70
|
}
|
|
@@ -73,5 +72,5 @@ repositories {
|
|
|
73
72
|
dependencies {
|
|
74
73
|
implementation "com.facebook.react:react-native:0.76.2"
|
|
75
74
|
|
|
76
|
-
implementation "io.cloudx:sdk:
|
|
75
|
+
implementation "io.cloudx:sdk:3.2.0"
|
|
77
76
|
}
|
|
@@ -83,7 +83,7 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
83
83
|
.setPluginVersion(pluginVersion)
|
|
84
84
|
.build()
|
|
85
85
|
|
|
86
|
-
CloudX.initialize(config, object : CloudXInitializationListener {
|
|
86
|
+
CloudX.initialize(reactApplicationContext, config, object : CloudXInitializationListener {
|
|
87
87
|
override fun onInitialized(configuration: CloudXSdkConfiguration) {
|
|
88
88
|
setupOrientationListener()
|
|
89
89
|
val result = Arguments.createMap()
|
|
@@ -149,6 +149,18 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
149
149
|
CloudX.clearAllKeyValues()
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
// =========================================================================
|
|
153
|
+
// Manual Privacy
|
|
154
|
+
// =========================================================================
|
|
155
|
+
|
|
156
|
+
fun setHasUserConsent(hasUserConsent: Boolean?) {
|
|
157
|
+
CloudX.setHasUserConsent(hasUserConsent)
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
fun setDoNotSell(isDoNotSell: Boolean?) {
|
|
161
|
+
CloudX.setDoNotSell(isDoNotSell)
|
|
162
|
+
}
|
|
163
|
+
|
|
152
164
|
// =========================================================================
|
|
153
165
|
// Banner (Programmatic)
|
|
154
166
|
// =========================================================================
|
|
@@ -196,20 +208,24 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
196
208
|
}
|
|
197
209
|
|
|
198
210
|
fun showInterstitial(adUnitId: String, placement: String?, customData: String?) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
211
|
+
reactApplicationContext.runOnUiQueueThread {
|
|
212
|
+
val interstitial = retrieveInterstitial(adUnitId)
|
|
213
|
+
val activity = maybeGetCurrentActivity()
|
|
214
|
+
if (activity == null) {
|
|
215
|
+
Log.e(TAG, "showInterstitial: no activity available")
|
|
216
|
+
return@runOnUiQueueThread
|
|
217
|
+
}
|
|
218
|
+
interstitial.show(activity, placement, customData)
|
|
204
219
|
}
|
|
205
|
-
interstitial.show(activity, placement, customData)
|
|
206
220
|
}
|
|
207
221
|
|
|
208
222
|
fun destroyInterstitial(adUnitId: String) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
223
|
+
reactApplicationContext.runOnUiQueueThread {
|
|
224
|
+
interstitials.remove(adUnitId)?.let {
|
|
225
|
+
it.listener = null
|
|
226
|
+
it.revenueListener = null
|
|
227
|
+
it.destroy()
|
|
228
|
+
}
|
|
213
229
|
}
|
|
214
230
|
}
|
|
215
231
|
|
|
@@ -226,20 +242,24 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
226
242
|
}
|
|
227
243
|
|
|
228
244
|
fun showRewarded(adUnitId: String, placement: String?, customData: String?) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
245
|
+
reactApplicationContext.runOnUiQueueThread {
|
|
246
|
+
val rewarded = retrieveRewarded(adUnitId)
|
|
247
|
+
val activity = maybeGetCurrentActivity()
|
|
248
|
+
if (activity == null) {
|
|
249
|
+
Log.e(TAG, "showRewarded: no activity available")
|
|
250
|
+
return@runOnUiQueueThread
|
|
251
|
+
}
|
|
252
|
+
rewarded.show(activity, placement, customData)
|
|
234
253
|
}
|
|
235
|
-
rewarded.show(activity, placement, customData)
|
|
236
254
|
}
|
|
237
255
|
|
|
238
256
|
fun destroyRewarded(adUnitId: String) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
257
|
+
reactApplicationContext.runOnUiQueueThread {
|
|
258
|
+
rewardedAds.remove(adUnitId)?.let {
|
|
259
|
+
it.listener = null
|
|
260
|
+
it.revenueListener = null
|
|
261
|
+
it.destroy()
|
|
262
|
+
}
|
|
243
263
|
}
|
|
244
264
|
}
|
|
245
265
|
|
|
@@ -260,7 +280,10 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
260
280
|
positionAdView(adUnitId, adFormat)
|
|
261
281
|
|
|
262
282
|
val adView = retrieveAdView(adUnitId, adFormat)
|
|
263
|
-
|
|
283
|
+
// Stop auto-refresh on load if the publisher has not yet
|
|
284
|
+
// called showBanner/showMREC. "Not yet shown" means either
|
|
285
|
+
// the view is hidden or it was loaded detached (new default).
|
|
286
|
+
if (adView != null && (adView.visibility != View.VISIBLE || adView.parent == null)) {
|
|
264
287
|
adView.stopAutoRefresh()
|
|
265
288
|
}
|
|
266
289
|
|
|
@@ -357,16 +380,17 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
357
380
|
private fun createAdView(adUnitId: String, adFormat: CloudXAdFormat, position: String, xOffset: Double, yOffset: Double) {
|
|
358
381
|
// Run on main thread to ensure there are no concurrency issues with other ad view methods
|
|
359
382
|
reactApplicationContext.runOnUiQueueThread {
|
|
383
|
+
// Intentionally load the ad view while detached from any window.
|
|
384
|
+
// Attaching-then-hiding-then-loading causes the underlying banner
|
|
385
|
+
// to take a prefetch code path whose hidden->visible transition
|
|
386
|
+
// does not reliably insert the adapter subview into the container
|
|
387
|
+
// — the ad is only inserted on the next auto-refresh cycle
|
|
388
|
+
// (~30s). Detached loads use the "display when added to a window"
|
|
389
|
+
// path, so showAdView attaches and displays immediately.
|
|
360
390
|
val adView = retrieveAdView(adUnitId, adFormat, position, Pair(xOffset.toFloat(), yOffset.toFloat()))
|
|
361
391
|
?: return@runOnUiQueueThread
|
|
362
392
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
if (adView.parent == null) {
|
|
366
|
-
maybeAttachToCurrentActivity(adView)
|
|
367
|
-
adViewAdFormats[adUnitId] = adFormat
|
|
368
|
-
positionAdView(adUnitId, adFormat)
|
|
369
|
-
}
|
|
393
|
+
adViewAdFormats[adUnitId] = adFormat
|
|
370
394
|
|
|
371
395
|
adView.load()
|
|
372
396
|
|
|
@@ -409,7 +433,15 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
409
433
|
return@runOnUiQueueThread
|
|
410
434
|
}
|
|
411
435
|
|
|
412
|
-
|
|
436
|
+
// Lazily attach and position on first show. Attaching here — not
|
|
437
|
+
// on creation — lets the underlying banner's ready-to-display
|
|
438
|
+
// path insert the adapter view on window attachment, avoiding the
|
|
439
|
+
// hidden->visible prefetch-but-not-inserted regression.
|
|
440
|
+
if (adView.parent == null) {
|
|
441
|
+
maybeAttachToCurrentActivity(adView)
|
|
442
|
+
positionAdView(adUnitId, adFormat)
|
|
443
|
+
}
|
|
444
|
+
|
|
413
445
|
adView.visibility = View.VISIBLE
|
|
414
446
|
adView.startAutoRefresh()
|
|
415
447
|
}
|
|
@@ -493,7 +525,7 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
493
525
|
private fun retrieveInterstitial(adUnitId: String): CloudXInterstitialAd {
|
|
494
526
|
var interstitial = interstitials[adUnitId]
|
|
495
527
|
if (interstitial == null) {
|
|
496
|
-
interstitial = CloudX.createInterstitial(adUnitId)
|
|
528
|
+
interstitial = CloudX.createInterstitial(reactApplicationContext, adUnitId)
|
|
497
529
|
interstitial.listener = createInterstitialListener(adUnitId)
|
|
498
530
|
interstitial.revenueListener = createFullscreenRevenueListener(adUnitId, CloudXAdEvents.ON_INTERSTITIAL_AD_REVENUE_PAID)
|
|
499
531
|
interstitials[adUnitId] = interstitial
|
|
@@ -504,7 +536,7 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
504
536
|
private fun retrieveRewarded(adUnitId: String): CloudXRewardedAd {
|
|
505
537
|
var rewarded = rewardedAds[adUnitId]
|
|
506
538
|
if (rewarded == null) {
|
|
507
|
-
rewarded = CloudX.createRewarded(adUnitId)
|
|
539
|
+
rewarded = CloudX.createRewarded(reactApplicationContext, adUnitId)
|
|
508
540
|
rewarded.listener = createRewardedListener(adUnitId)
|
|
509
541
|
rewarded.revenueListener = createFullscreenRevenueListener(adUnitId, CloudXAdEvents.ON_REWARDED_AD_REVENUE_PAID)
|
|
510
542
|
rewardedAds[adUnitId] = rewarded
|
|
@@ -519,7 +551,7 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
519
551
|
private fun retrieveAdView(adUnitId: String, adFormat: CloudXAdFormat, position: String?, offsetsDp: Pair<Float, Float>): SdkAdView? {
|
|
520
552
|
var adView = adViews[adUnitId]
|
|
521
553
|
if (adView == null && position != null) {
|
|
522
|
-
adView = if (adFormat == CloudXAdFormat.MREC) CloudX.createMREC(adUnitId) else CloudX.createBanner(adUnitId)
|
|
554
|
+
adView = if (adFormat == CloudXAdFormat.MREC) CloudX.createMREC(reactApplicationContext, adUnitId) else CloudX.createBanner(reactApplicationContext, adUnitId)
|
|
523
555
|
adView.listener = createAdViewListener(adUnitId, adFormat)
|
|
524
556
|
adView.revenueListener = createAdViewRevenueListener(adUnitId, adFormat)
|
|
525
557
|
adViews[adUnitId] = adView
|
|
@@ -637,15 +669,17 @@ class CloudXModuleImpl(private val reactApplicationContext: ReactApplicationCont
|
|
|
637
669
|
destroyAdView(adUnitId, adFormat)
|
|
638
670
|
}
|
|
639
671
|
|
|
640
|
-
|
|
641
|
-
interstitial.
|
|
642
|
-
|
|
643
|
-
|
|
672
|
+
reactApplicationContext.runOnUiQueueThread {
|
|
673
|
+
for (interstitial in interstitials.values) {
|
|
674
|
+
interstitial.destroy()
|
|
675
|
+
}
|
|
676
|
+
interstitials.clear()
|
|
644
677
|
|
|
645
|
-
|
|
646
|
-
|
|
678
|
+
for (rewarded in rewardedAds.values) {
|
|
679
|
+
rewarded.destroy()
|
|
680
|
+
}
|
|
681
|
+
rewardedAds.clear()
|
|
647
682
|
}
|
|
648
|
-
rewardedAds.clear()
|
|
649
683
|
}
|
|
650
684
|
|
|
651
685
|
// =========================================================================
|
|
@@ -27,6 +27,9 @@ class CloudXModule(reactContext: ReactApplicationContext) :
|
|
|
27
27
|
@ReactMethod override fun setAppKeyValue(key: String, value: String) = impl.setAppKeyValue(key, value)
|
|
28
28
|
@ReactMethod override fun clearAllKeyValues() = impl.clearAllKeyValues()
|
|
29
29
|
|
|
30
|
+
@ReactMethod override fun setHasUserConsent(hasUserConsent: Boolean?) = impl.setHasUserConsent(hasUserConsent)
|
|
31
|
+
@ReactMethod override fun setDoNotSell(isDoNotSell: Boolean?) = impl.setDoNotSell(isDoNotSell)
|
|
32
|
+
|
|
30
33
|
@ReactMethod override fun createBanner(adUnitId: String, position: String) = impl.createBanner(adUnitId, position)
|
|
31
34
|
@ReactMethod override fun createBannerWithOffsets(adUnitId: String, position: String, xOffset: Double, yOffset: Double) = impl.createBannerWithOffsets(adUnitId, position, xOffset, yOffset)
|
|
32
35
|
@ReactMethod override fun setBannerBackgroundColor(adUnitId: String, hexColorString: String) = impl.setBannerBackgroundColor(adUnitId, hexColorString)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.cloudxreactnative
|
|
2
2
|
|
|
3
|
+
import com.facebook.react.bridge.Dynamic
|
|
3
4
|
import com.facebook.react.bridge.Promise
|
|
4
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
6
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
@@ -25,6 +26,24 @@ class CloudXModule(reactContext: ReactApplicationContext) :
|
|
|
25
26
|
@ReactMethod fun setAppKeyValue(key: String, value: String) = impl.setAppKeyValue(key, value)
|
|
26
27
|
@ReactMethod fun clearAllKeyValues() = impl.clearAllKeyValues()
|
|
27
28
|
|
|
29
|
+
// Paper's `JavaMethodWrapper` extracts primitive boxed types via
|
|
30
|
+
// `ReadableNativeArray.getBoolean(int)` which unconditionally calls
|
|
31
|
+
// `booleanValue()` on the boxed result — null arguments therefore throw
|
|
32
|
+
// `NativeArgumentsParseException` *before* the method runs, even when the
|
|
33
|
+
// Kotlin signature is `Boolean?`. Declaring the parameter as `Dynamic`
|
|
34
|
+
// lets the bridge hand us the raw value and we null-check it ourselves.
|
|
35
|
+
// TurboModules (NewArch) don't have this limitation, which is why the
|
|
36
|
+
// newarch counterpart keeps the `Boolean?` signature directly.
|
|
37
|
+
@ReactMethod fun setHasUserConsent(hasUserConsent: Dynamic) {
|
|
38
|
+
val value: Boolean? = if (hasUserConsent.isNull) null else hasUserConsent.asBoolean()
|
|
39
|
+
impl.setHasUserConsent(value)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@ReactMethod fun setDoNotSell(isDoNotSell: Dynamic) {
|
|
43
|
+
val value: Boolean? = if (isDoNotSell.isNull) null else isDoNotSell.asBoolean()
|
|
44
|
+
impl.setDoNotSell(value)
|
|
45
|
+
}
|
|
46
|
+
|
|
28
47
|
@ReactMethod fun createBanner(adUnitId: String, position: String) = impl.createBanner(adUnitId, position)
|
|
29
48
|
@ReactMethod fun createBannerWithOffsets(adUnitId: String, position: String, xOffset: Double, yOffset: Double) = impl.createBannerWithOffsets(adUnitId, position, xOffset, yOffset)
|
|
30
49
|
@ReactMethod fun setBannerBackgroundColor(adUnitId: String, hexColorString: String) = impl.setBannerBackgroundColor(adUnitId, hexColorString)
|
package/ios/CloudX.mm
CHANGED
|
@@ -11,6 +11,42 @@
|
|
|
11
11
|
+ (nullable UIColor *)clx_colorWithHexString:(NSString *)hexString;
|
|
12
12
|
@end
|
|
13
13
|
|
|
14
|
+
// Diagnostic-only observer. Inserted as a zero-size hidden subview of the
|
|
15
|
+
// CLXBannerAdView so we can detect when the banner's window attachment changes.
|
|
16
|
+
// A subview's window follows its superview's, so window transitions on the
|
|
17
|
+
// observer are a reliable proxy for transitions on the banner itself.
|
|
18
|
+
// TODO(CXD-banner-diag): remove once the iOS RN banner visibility issue is
|
|
19
|
+
// root-caused and fixed.
|
|
20
|
+
@interface CLXDiagBannerWindowObserver : UIView
|
|
21
|
+
@property (nonatomic, copy, nullable) NSString *adUnitIdentifier;
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
@implementation CLXDiagBannerWindowObserver
|
|
25
|
+
|
|
26
|
+
- (instancetype)initWithAdUnitIdentifier:(NSString *)adUnitIdentifier
|
|
27
|
+
{
|
|
28
|
+
self = [super initWithFrame: CGRectZero];
|
|
29
|
+
if (self) {
|
|
30
|
+
_adUnitIdentifier = [adUnitIdentifier copy];
|
|
31
|
+
self.hidden = YES;
|
|
32
|
+
self.userInteractionEnabled = NO;
|
|
33
|
+
self.translatesAutoresizingMaskIntoConstraints = YES;
|
|
34
|
+
}
|
|
35
|
+
return self;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
- (void)didMoveToWindow
|
|
39
|
+
{
|
|
40
|
+
[super didMoveToWindow];
|
|
41
|
+
NSLog(@"[CloudXCore] [CloudX] DIAG banner[%@] didMoveToWindow: window=%@ superview=%@ superview.window=%@",
|
|
42
|
+
self.adUnitIdentifier ?: @"(nil)",
|
|
43
|
+
self.window,
|
|
44
|
+
self.superview ? NSStringFromClass([self.superview class]) : @"(nil)",
|
|
45
|
+
self.superview ? self.superview.window : @"(nil)");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@end
|
|
49
|
+
|
|
14
50
|
@interface CloudX()
|
|
15
51
|
|
|
16
52
|
// A simple BOOL tracks initialization state. Concurrent initialize calls are serialized
|
|
@@ -214,6 +250,22 @@ RCT_EXPORT_METHOD(clearAllKeyValues)
|
|
|
214
250
|
[[CloudXCore shared] clearAllKeyValues];
|
|
215
251
|
}
|
|
216
252
|
|
|
253
|
+
#pragma mark - Manual Privacy
|
|
254
|
+
|
|
255
|
+
// RCT_EXPORT_METHOD applies implicit nonnull to object-pointer arguments via the bridge's
|
|
256
|
+
// NS_ASSUME_NONNULL context, so `nullable` here conflicts with the macro-generated prototype
|
|
257
|
+
// under Release/arm64 archive builds. Bridge semantics already convert JS `null`/`undefined`
|
|
258
|
+
// to Obj-C `nil`, so the clear-value path works regardless of the annotation.
|
|
259
|
+
RCT_EXPORT_METHOD(setHasUserConsent:(NSNumber *)hasUserConsent)
|
|
260
|
+
{
|
|
261
|
+
[CloudXCore setHasUserConsent: hasUserConsent];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
RCT_EXPORT_METHOD(setDoNotSell:(NSNumber *)isDoNotSell)
|
|
265
|
+
{
|
|
266
|
+
[CloudXCore setDoNotSell: isDoNotSell];
|
|
267
|
+
}
|
|
268
|
+
|
|
217
269
|
#pragma mark - Banners
|
|
218
270
|
|
|
219
271
|
RCT_EXPORT_METHOD(createBanner:(NSString *)adUnitIdentifier position:(NSString *)bannerPosition)
|
|
@@ -709,12 +761,17 @@ RCT_EXPORT_METHOD(destroyRewarded:(NSString *)adUnitIdentifier)
|
|
|
709
761
|
[self executeOnMainQueue:^{
|
|
710
762
|
[self log: @"Creating %ld with ad unit identifier \"%@\", position: \"%@\", and offset: %@", (long)adFormat, adUnitIdentifier, adViewPosition, NSStringFromCGPoint(offset)];
|
|
711
763
|
|
|
764
|
+
// Intentionally load the ad while the view is detached from any window
|
|
765
|
+
// (retrieveAdView no longer auto-attaches on creation). Loading while
|
|
766
|
+
// attached-but-hidden causes the underlying banner to take a prefetch
|
|
767
|
+
// code path whose hidden->visible transition does not reliably insert
|
|
768
|
+
// the adapter subview into the container — the user sees the banner
|
|
769
|
+
// only after the next auto-refresh cycle (~30s). Detached loads use
|
|
770
|
+
// the "display when added to a window" path, which inserts the
|
|
771
|
+
// adapter view as soon as showBanner/showMREC attaches the view.
|
|
712
772
|
CLXBannerAdView *adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat atPosition: adViewPosition withOffset: offset];
|
|
713
|
-
adView.hidden = YES;
|
|
714
|
-
self.safeAreaBackgrounds[adUnitIdentifier].hidden = YES;
|
|
715
773
|
|
|
716
774
|
self.adViewAdFormats[adUnitIdentifier] = @(adFormat);
|
|
717
|
-
[self positionAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
|
|
718
775
|
|
|
719
776
|
[adView load];
|
|
720
777
|
|
|
@@ -810,8 +867,38 @@ RCT_EXPORT_METHOD(destroyRewarded:(NSString *)adUnitIdentifier)
|
|
|
810
867
|
{
|
|
811
868
|
[self log: @"%ld does not exist for ad unit identifier %@. Deferring show.", (long)adFormat, adUnitIdentifier];
|
|
812
869
|
[self.adUnitIdentifiersToShowAfterCreate addObject: adUnitIdentifier];
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
// Lazily attach to the current top view controller and apply layout
|
|
874
|
+
// constraints the first time show is called. Attaching here (rather
|
|
875
|
+
// than on creation) ensures the underlying banner's "ready to display
|
|
876
|
+
// on window attachment" path inserts the adapter view immediately.
|
|
877
|
+
if ( !view.superview )
|
|
878
|
+
{
|
|
879
|
+
// TODO(CXD-banner-diag): remove once the iOS RN banner visibility
|
|
880
|
+
// issue is root-caused and fixed.
|
|
881
|
+
[self logBannerAttachDiagnosticsForAdUnit: adUnitIdentifier phase: @"pre-attach" view: view];
|
|
882
|
+
|
|
883
|
+
UIView *rootView = [self topViewController].view;
|
|
884
|
+
if ( rootView )
|
|
885
|
+
{
|
|
886
|
+
[rootView addSubview: view];
|
|
887
|
+
[self attachDiagObserverToBanner: view adUnit: adUnitIdentifier];
|
|
888
|
+
[self logBannerAttachDiagnosticsForAdUnit: adUnitIdentifier phase: @"post-attach" view: view];
|
|
889
|
+
[self scheduleBannerAttachFollowupsForAdUnit: adUnitIdentifier view: view];
|
|
890
|
+
}
|
|
891
|
+
else
|
|
892
|
+
{
|
|
893
|
+
[self log: @"showAdView: no visible root view for ad unit \"%@\"; deferring.", adUnitIdentifier];
|
|
894
|
+
[self logBannerAttachDiagnosticsForAdUnit: adUnitIdentifier phase: @"no-root-view" view: view];
|
|
895
|
+
[self.adUnitIdentifiersToShowAfterCreate addObject: adUnitIdentifier];
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
813
898
|
}
|
|
814
899
|
|
|
900
|
+
[self positionAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
|
|
901
|
+
|
|
815
902
|
self.safeAreaBackgrounds[adUnitIdentifier].hidden = NO;
|
|
816
903
|
view.hidden = NO;
|
|
817
904
|
|
|
@@ -819,6 +906,68 @@ RCT_EXPORT_METHOD(destroyRewarded:(NSString *)adUnitIdentifier)
|
|
|
819
906
|
}];
|
|
820
907
|
}
|
|
821
908
|
|
|
909
|
+
// TODO(CXD-banner-diag): remove once the iOS RN banner visibility issue is
|
|
910
|
+
// root-caused and fixed.
|
|
911
|
+
- (void)logBannerAttachDiagnosticsForAdUnit:(NSString *)adUnitIdentifier
|
|
912
|
+
phase:(NSString *)phase
|
|
913
|
+
view:(CLXBannerAdView *)view
|
|
914
|
+
{
|
|
915
|
+
UIViewController *topVC = [self topViewController];
|
|
916
|
+
UIViewController *rootVC = [self keyWindowRootViewController];
|
|
917
|
+
NSUInteger connectedSceneCount = UIApplication.sharedApplication.connectedScenes.count;
|
|
918
|
+
NSUInteger foregroundSceneCount = 0;
|
|
919
|
+
for (UIScene *scene in UIApplication.sharedApplication.connectedScenes) {
|
|
920
|
+
if (scene.activationState == UISceneActivationStateForegroundActive) foregroundSceneCount++;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
NSLog(@"[CloudXCore] [CloudX] DIAG banner[%@] %@: "
|
|
924
|
+
@"view.window=%@ view.superview=%@ view.hidden=%d "
|
|
925
|
+
@"topVC=%@ topVC.view.window=%@ "
|
|
926
|
+
@"rootVC=%@ rootVC.view.window=%@ "
|
|
927
|
+
@"scenes=total:%lu foregroundActive:%lu",
|
|
928
|
+
adUnitIdentifier,
|
|
929
|
+
phase,
|
|
930
|
+
view.window,
|
|
931
|
+
view.superview ? NSStringFromClass([view.superview class]) : @"(nil)",
|
|
932
|
+
view.hidden,
|
|
933
|
+
topVC ? NSStringFromClass([topVC class]) : @"(nil)",
|
|
934
|
+
topVC.view.window,
|
|
935
|
+
rootVC ? NSStringFromClass([rootVC class]) : @"(nil)",
|
|
936
|
+
rootVC.view.window,
|
|
937
|
+
(unsigned long)connectedSceneCount,
|
|
938
|
+
(unsigned long)foregroundSceneCount);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// TODO(CXD-banner-diag): remove once root-caused.
|
|
942
|
+
- (void)scheduleBannerAttachFollowupsForAdUnit:(NSString *)adUnitIdentifier
|
|
943
|
+
view:(CLXBannerAdView *)view
|
|
944
|
+
{
|
|
945
|
+
__weak CloudX *weakSelf = self;
|
|
946
|
+
__weak CLXBannerAdView *weakView = view;
|
|
947
|
+
NSArray<NSNumber *> *delaysSeconds = @[ @0.25, @1.0, @3.0, @10.0 ];
|
|
948
|
+
for (NSNumber *delay in delaysSeconds) {
|
|
949
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay.doubleValue * NSEC_PER_SEC)),
|
|
950
|
+
dispatch_get_main_queue(), ^{
|
|
951
|
+
CloudX *strongSelf = weakSelf;
|
|
952
|
+
CLXBannerAdView *strongView = weakView;
|
|
953
|
+
if (!strongSelf || !strongView) return;
|
|
954
|
+
NSString *phase = [NSString stringWithFormat: @"post-attach+%@s", delay];
|
|
955
|
+
[strongSelf logBannerAttachDiagnosticsForAdUnit: adUnitIdentifier phase: phase view: strongView];
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
// TODO(CXD-banner-diag): remove once root-caused.
|
|
961
|
+
- (void)attachDiagObserverToBanner:(CLXBannerAdView *)view
|
|
962
|
+
adUnit:(NSString *)adUnitIdentifier
|
|
963
|
+
{
|
|
964
|
+
for (UIView *subview in view.subviews) {
|
|
965
|
+
if ([subview isKindOfClass: [CLXDiagBannerWindowObserver class]]) return;
|
|
966
|
+
}
|
|
967
|
+
CLXDiagBannerWindowObserver *observer = [[CLXDiagBannerWindowObserver alloc] initWithAdUnitIdentifier: adUnitIdentifier];
|
|
968
|
+
[view addSubview: observer];
|
|
969
|
+
}
|
|
970
|
+
|
|
822
971
|
- (void)hideAdViewWithAdUnitIdentifier:(NSString *)adUnitIdentifier adFormat:(CLXBannerType)adFormat
|
|
823
972
|
{
|
|
824
973
|
[self executeOnMainQueue:^{
|
|
@@ -951,15 +1100,10 @@ RCT_EXPORT_METHOD(destroyRewarded:(NSString *)adUnitIdentifier)
|
|
|
951
1100
|
self.adViewPositions[adUnitIdentifier] = adViewPosition;
|
|
952
1101
|
self.adViewOffsets[adUnitIdentifier] = [NSValue valueWithCGPoint: offset];
|
|
953
1102
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
else
|
|
960
|
-
{
|
|
961
|
-
[self log: @"retrieveAdView: no visible root view for ad unit \"%@\"", adUnitIdentifier];
|
|
962
|
-
}
|
|
1103
|
+
// Deliberately do not attach to a window here. showAdView handles
|
|
1104
|
+
// attachment so the underlying banner loads while detached and the
|
|
1105
|
+
// adapter subview is inserted on window attachment (not on a
|
|
1106
|
+
// hidden->visible transition, which is unreliable).
|
|
963
1107
|
}
|
|
964
1108
|
|
|
965
1109
|
return result;
|
package/lib/commonjs/CloudX.js
CHANGED
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.CloudX = void 0;
|
|
7
7
|
var _NativeCloudX = _interopRequireDefault(require("./specs/NativeCloudX"));
|
|
8
|
+
var _version = require("./version");
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const VERSION = '2.0.0';
|
|
10
10
|
const isInitialized = () => {
|
|
11
11
|
return _NativeCloudX.default.isInitialized();
|
|
12
12
|
};
|
|
13
13
|
const initialize = appKey => {
|
|
14
|
-
return _NativeCloudX.default.initialize(
|
|
14
|
+
return _NativeCloudX.default.initialize(_version.PLUGIN_VERSION, appKey);
|
|
15
15
|
};
|
|
16
16
|
const isTablet = () => {
|
|
17
17
|
return _NativeCloudX.default.isTablet();
|
|
@@ -37,6 +37,12 @@ const clearAllKeyValues = () => {
|
|
|
37
37
|
const setVisualDebuggingEnabled = enabled => {
|
|
38
38
|
_NativeCloudX.default.setVisualDebuggingEnabled(enabled);
|
|
39
39
|
};
|
|
40
|
+
const setHasUserConsent = hasUserConsent => {
|
|
41
|
+
_NativeCloudX.default.setHasUserConsent(hasUserConsent);
|
|
42
|
+
};
|
|
43
|
+
const setDoNotSell = isDoNotSell => {
|
|
44
|
+
_NativeCloudX.default.setDoNotSell(isDoNotSell);
|
|
45
|
+
};
|
|
40
46
|
const CloudX = exports.CloudX = {
|
|
41
47
|
isInitialized,
|
|
42
48
|
initialize,
|
|
@@ -47,7 +53,9 @@ const CloudX = exports.CloudX = {
|
|
|
47
53
|
setUserKeyValue,
|
|
48
54
|
setAppKeyValue,
|
|
49
55
|
clearAllKeyValues,
|
|
50
|
-
setVisualDebuggingEnabled
|
|
56
|
+
setVisualDebuggingEnabled,
|
|
57
|
+
setHasUserConsent,
|
|
58
|
+
setDoNotSell
|
|
51
59
|
};
|
|
52
60
|
var _default = exports.default = CloudX;
|
|
53
61
|
//# sourceMappingURL=CloudX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeCloudX","_interopRequireDefault","require","e","__esModule","default","
|
|
1
|
+
{"version":3,"names":["_NativeCloudX","_interopRequireDefault","require","_version","e","__esModule","default","isInitialized","NativeCloudX","initialize","appKey","PLUGIN_VERSION","isTablet","getVersion","setMinLogLevel","level","setHashedUserID","hashedUserID","setUserKeyValue","key","value","setAppKeyValue","clearAllKeyValues","setVisualDebuggingEnabled","enabled","setHasUserConsent","hasUserConsent","setDoNotSell","isDoNotSell","CloudX","exports","_default"],"sourceRoot":"../../src","sources":["CloudX.ts"],"mappings":";;;;;;AAEA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA2C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3C,MAAMG,aAAa,GAAGA,CAAA,KAAwB;EAC1C,OAAOC,qBAAY,CAACD,aAAa,CAAC,CAAC;AACvC,CAAC;AAED,MAAME,UAAU,GAAIC,MAAc,IAA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Ac;EACdE,eAAe;EACfE,eAAe;EACfG,cAAc;EACdC,iBAAiB;EACjBC,yBAAyB;EACzBE,iBAAiB;EACjBE;AACJ,CAAC;AAAC,IAAAI,QAAA,GAAAD,OAAA,CAAAxB,OAAA,GAEauB,MAAM","ignoreList":[]}
|
|
@@ -54,6 +54,8 @@ let CloudXErrorCode = exports.CloudXErrorCode = /*#__PURE__*/function (CloudXErr
|
|
|
54
54
|
CloudXErrorCode[CloudXErrorCode["ADS_DISABLED"] = 301] = "ADS_DISABLED";
|
|
55
55
|
/** No ad available (no fill). */
|
|
56
56
|
CloudXErrorCode[CloudXErrorCode["NO_FILL"] = 302] = "NO_FILL";
|
|
57
|
+
/** `load` was called while a fullscreen ad is currently being displayed. Wait for the hidden callback. */
|
|
58
|
+
CloudXErrorCode[CloudXErrorCode["LOAD_NOT_ALLOWED_WHILE_SHOWING"] = 303] = "LOAD_NOT_ALLOWED_WHILE_SHOWING";
|
|
57
59
|
/** Ad failed to load. */
|
|
58
60
|
CloudXErrorCode[CloudXErrorCode["LOAD_FAILED"] = 304] = "LOAD_FAILED";
|
|
59
61
|
// AD DISPLAY / SHOW (400-499)
|
|
@@ -111,6 +113,8 @@ let CloudXErrorCode = exports.CloudXErrorCode = /*#__PURE__*/function (CloudXErr
|
|
|
111
113
|
CloudXErrorCode[CloudXErrorCode["ADAPTER_MISSING_VIEW_CONTROLLER"] = 620] = "ADAPTER_MISSING_VIEW_CONTROLLER";
|
|
112
114
|
/** Adapter failed to display the ad. */
|
|
113
115
|
CloudXErrorCode[CloudXErrorCode["ADAPTER_DISPLAY_FAILED"] = 621] = "ADAPTER_DISPLAY_FAILED";
|
|
116
|
+
/** Ad network SDK did not complete initialization within the configured per-adapter timeout. */
|
|
117
|
+
CloudXErrorCode[CloudXErrorCode["ADAPTER_INITIALIZATION_TIMEOUT"] = 622] = "ADAPTER_INITIALIZATION_TIMEOUT";
|
|
114
118
|
return CloudXErrorCode;
|
|
115
119
|
}({});
|
|
116
120
|
//# sourceMappingURL=CloudXErrorCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CloudXErrorCode","exports"],"sourceRoot":"../../src","sources":["CloudXErrorCode.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA,IAaYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EACvB;EAEA;EAHQA,eAAe,CAAfA,eAAe;EAMvB;EAEA;EARQA,eAAe,CAAfA,eAAe;EAWvB;EAXQA,eAAe,CAAfA,eAAe;EAcvB;EAdQA,eAAe,CAAfA,eAAe;EAiBvB;EAjBQA,eAAe,CAAfA,eAAe;EAoBvB;EApBQA,eAAe,CAAfA,eAAe;EAuBvB;EAvBQA,eAAe,CAAfA,eAAe;EA0BvB;EA1BQA,eAAe,CAAfA,eAAe;EA6BvB;EAEA;EA/BQA,eAAe,CAAfA,eAAe;EAkCvB;EAlCQA,eAAe,CAAfA,eAAe;EAqCvB;EArCQA,eAAe,CAAfA,eAAe;EAwCvB;EAxCQA,eAAe,CAAfA,eAAe;EA2CvB;EA3CQA,eAAe,CAAfA,eAAe;EA8CvB;EAEA;EAhDQA,eAAe,CAAfA,eAAe;EAmDvB;EAnDQA,eAAe,CAAfA,eAAe;EAsDvB;EAtDQA,eAAe,CAAfA,eAAe;EAyDvB;EAzDQA,eAAe,CAAfA,eAAe;EA4DvB;
|
|
1
|
+
{"version":3,"names":["CloudXErrorCode","exports"],"sourceRoot":"../../src","sources":["CloudXErrorCode.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA,IAaYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EACvB;EAEA;EAHQA,eAAe,CAAfA,eAAe;EAMvB;EAEA;EARQA,eAAe,CAAfA,eAAe;EAWvB;EAXQA,eAAe,CAAfA,eAAe;EAcvB;E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A,eAAe;EA8HvB;EA9HQA,eAAe,CAAfA,eAAe;EAiIvB;EAjIQA,eAAe,CAAfA,eAAe;EAoIvB;EApIQA,eAAe,CAAfA,eAAe;EAuIvB;EAvIQA,eAAe,CAAfA,eAAe;EA0IvB;EA1IQA,eAAe,CAAfA,eAAe;EA6IvB;EA7IQA,eAAe,CAAfA,eAAe;EAgJvB;EAhJQA,eAAe,CAAfA,eAAe;EAmJvB;EAnJQA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeCloudX.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeCloudX.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GA+IeC,gCAAmB,CAACC,YAAY,CAAO,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PLUGIN_VERSION = void 0;
|
|
7
|
+
// Keep PLUGIN_VERSION in sync with the `version` field in package.json.
|
|
8
|
+
// Phase 1 of RELEASE.md bumps both together.
|
|
9
|
+
const PLUGIN_VERSION = exports.PLUGIN_VERSION = '3.2.0';
|
|
10
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PLUGIN_VERSION","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAA;AACA;AACO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,OAAO","ignoreList":[]}
|
package/lib/module/CloudX.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import NativeCloudX from './specs/NativeCloudX';
|
|
2
|
-
|
|
2
|
+
import { PLUGIN_VERSION } from './version';
|
|
3
3
|
const isInitialized = () => {
|
|
4
4
|
return NativeCloudX.isInitialized();
|
|
5
5
|
};
|
|
6
6
|
const initialize = appKey => {
|
|
7
|
-
return NativeCloudX.initialize(
|
|
7
|
+
return NativeCloudX.initialize(PLUGIN_VERSION, appKey);
|
|
8
8
|
};
|
|
9
9
|
const isTablet = () => {
|
|
10
10
|
return NativeCloudX.isTablet();
|
|
@@ -30,6 +30,12 @@ const clearAllKeyValues = () => {
|
|
|
30
30
|
const setVisualDebuggingEnabled = enabled => {
|
|
31
31
|
NativeCloudX.setVisualDebuggingEnabled(enabled);
|
|
32
32
|
};
|
|
33
|
+
const setHasUserConsent = hasUserConsent => {
|
|
34
|
+
NativeCloudX.setHasUserConsent(hasUserConsent);
|
|
35
|
+
};
|
|
36
|
+
const setDoNotSell = isDoNotSell => {
|
|
37
|
+
NativeCloudX.setDoNotSell(isDoNotSell);
|
|
38
|
+
};
|
|
33
39
|
export const CloudX = {
|
|
34
40
|
isInitialized,
|
|
35
41
|
initialize,
|
|
@@ -40,7 +46,9 @@ export const CloudX = {
|
|
|
40
46
|
setUserKeyValue,
|
|
41
47
|
setAppKeyValue,
|
|
42
48
|
clearAllKeyValues,
|
|
43
|
-
setVisualDebuggingEnabled
|
|
49
|
+
setVisualDebuggingEnabled,
|
|
50
|
+
setHasUserConsent,
|
|
51
|
+
setDoNotSell
|
|
44
52
|
};
|
|
45
53
|
export default CloudX;
|
|
46
54
|
//# sourceMappingURL=CloudX.js.map
|
package/lib/module/CloudX.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeCloudX","
|
|
1
|
+
{"version":3,"names":["NativeCloudX","PLUGIN_VERSION","isInitialized","initialize","appKey","isTablet","getVersion","setMinLogLevel","level","setHashedUserID","hashedUserID","setUserKeyValue","key","value","setAppKeyValue","clearAllKeyValues","setVisualDebuggingEnabled","enabled","setHasUserConsent","hasUserConsent","setDoNotSell","isDoNotSell","CloudX"],"sourceRoot":"../../src","sources":["CloudX.ts"],"mappings":"AAEA,OAAOA,YAAY,MAAM,sBAAsB;AAC/C,SAASC,cAAc,QAAQ,WAAW;AAE1C,MAAMC,aAAa,GAAGA,CAAA,KAAwB;EAC1C,OAAOF,YAAY,CAACE,aAAa,CAAC,CAAC;AACvC,CAAC;AAED,MAAMC,UAAU,GAAIC,MAAc,IAA0C;EACxE,OAAOJ,YAAY,CAACG,UAAU,CAACF,cAAc,EAAEG,MAAM,CAAC;AAC1D,CAAC;AAED,MAAMC,QAAQ,GAAGA,CAAA,KAAwB;EACrC,OAAOL,YAAY,CAACK,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,MAAMC,UAAU,GAAGA,CAAA,KAAuB;EACtC,OAAON,YAAY,CAACM,UAAU,CAAC,CAAC;AACpC,CAAC;AAED,MAAMC,cAAc,GAAIC,KAA0B,IAAW;EACzDR,YAAY,CAACO,cAAc,CAACC,KAAK,CAAC;AACtC,CAAC;AAED,MAAMC,eAAe,GAAIC,YAAoB,IAAW;EACpDV,YAAY,CAACS,eAAe,CAACC,YAAY,CAAC;AAC9C,CAAC;AAED,MAAMC,eAAe,GAAGA,CAACC,GAAW,EAAEC,KAAa,KAAW;EAC1Db,YAAY,CAACW,eAAe,CAACC,GAAG,EAAEC,KAAK,CAAC;AAC5C,CAAC;AAED,MAAMC,cAAc,GAAGA,CAACF,GAAW,EAAEC,KAAa,KAAW;EACzDb,YAAY,CAACc,cAAc,CAACF,GAAG,EAAEC,KAAK,CAAC;AAC3C,CAAC;AAED,MAAME,iBAAiB,GAAGA,CAAA,KAAY;EAClCf,YAAY,CAACe,iBAAiB,CAAC,CAAC;AACpC,CAAC;AAED,MAAMC,yBAAyB,GAAIC,OAAgB,IAAW;EAC1DjB,YAAY,CAACgB,yBAAyB,CAACC,OAAO,CAAC;AACnD,CAAC;AAED,MAAMC,iBAAiB,GAAIC,cAA8B,IAAW;EAChEnB,YAAY,CAACkB,iBAAiB,CAACC,cAAc,CAAC;AAClD,CAAC;AAED,MAAMC,YAAY,GAAIC,WAA2B,IAAW;EACxDrB,YAAY,CAACoB,YAAY,CAACC,WAAW,CAAC;AAC1C,CAAC;AAED,OAAO,MAAMC,MAAkB,GAAG;EAC9BpB,aAAa;EACbC,UAAU;EACVE,QAAQ;EACRC,UAAU;EACVC,cAAc;EACdE,eAAe;EACfE,eAAe;EACfG,cAAc;EACdC,iBAAiB;EACjBC,yBAAyB;EACzBE,iBAAiB;EACjBE;AACJ,CAAC;AAED,eAAeE,MAAM","ignoreList":[]}
|
|
@@ -48,6 +48,8 @@ export let CloudXErrorCode = /*#__PURE__*/function (CloudXErrorCode) {
|
|
|
48
48
|
CloudXErrorCode[CloudXErrorCode["ADS_DISABLED"] = 301] = "ADS_DISABLED";
|
|
49
49
|
/** No ad available (no fill). */
|
|
50
50
|
CloudXErrorCode[CloudXErrorCode["NO_FILL"] = 302] = "NO_FILL";
|
|
51
|
+
/** `load` was called while a fullscreen ad is currently being displayed. Wait for the hidden callback. */
|
|
52
|
+
CloudXErrorCode[CloudXErrorCode["LOAD_NOT_ALLOWED_WHILE_SHOWING"] = 303] = "LOAD_NOT_ALLOWED_WHILE_SHOWING";
|
|
51
53
|
/** Ad failed to load. */
|
|
52
54
|
CloudXErrorCode[CloudXErrorCode["LOAD_FAILED"] = 304] = "LOAD_FAILED";
|
|
53
55
|
// AD DISPLAY / SHOW (400-499)
|
|
@@ -105,6 +107,8 @@ export let CloudXErrorCode = /*#__PURE__*/function (CloudXErrorCode) {
|
|
|
105
107
|
CloudXErrorCode[CloudXErrorCode["ADAPTER_MISSING_VIEW_CONTROLLER"] = 620] = "ADAPTER_MISSING_VIEW_CONTROLLER";
|
|
106
108
|
/** Adapter failed to display the ad. */
|
|
107
109
|
CloudXErrorCode[CloudXErrorCode["ADAPTER_DISPLAY_FAILED"] = 621] = "ADAPTER_DISPLAY_FAILED";
|
|
110
|
+
/** Ad network SDK did not complete initialization within the configured per-adapter timeout. */
|
|
111
|
+
CloudXErrorCode[CloudXErrorCode["ADAPTER_INITIALIZATION_TIMEOUT"] = 622] = "ADAPTER_INITIALIZATION_TIMEOUT";
|
|
108
112
|
return CloudXErrorCode;
|
|
109
113
|
}({});
|
|
110
114
|
//# sourceMappingURL=CloudXErrorCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CloudXErrorCode"],"sourceRoot":"../../src","sources":["CloudXErrorCode.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EACvB;EAEA;EAHQA,eAAe,CAAfA,eAAe;EAMvB;EAEA;EARQA,eAAe,CAAfA,eAAe;EAWvB;EAXQA,eAAe,CAAfA,eAAe;EAcvB;EAdQA,eAAe,CAAfA,eAAe;EAiBvB;EAjBQA,eAAe,CAAfA,eAAe;EAoBvB;EApBQA,eAAe,CAAfA,eAAe;EAuBvB;EAvBQA,eAAe,CAAfA,eAAe;EA0BvB;EA1BQA,eAAe,CAAfA,eAAe;EA6BvB;EAEA;EA/BQA,eAAe,CAAfA,eAAe;EAkCvB;EAlCQA,eAAe,CAAfA,eAAe;EAqCvB;EArCQA,eAAe,CAAfA,eAAe;EAwCvB;EAxCQA,eAAe,CAAfA,eAAe;EA2CvB;EA3CQA,eAAe,CAAfA,eAAe;EA8CvB;EAEA;EAhDQA,eAAe,CAAfA,eAAe;EAmDvB;EAnDQA,eAAe,CAAfA,eAAe;EAsDv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A,eAAe,CAAfA,eAAe;EAgGvB;EAhGQA,eAAe,CAAfA,eAAe;EAmGvB;EAnGQA,eAAe,CAAfA,eAAe;EAsGvB;EAtGQA,eAAe,CAAfA,eAAe;EAyGvB;EAzGQA,eAAe,CAAfA,eAAe;EA4GvB;EA5GQA,eAAe,CAAfA,eAAe;EA+GvB;EA/GQA,eAAe,CAAfA,eAAe;EAkHvB;EAlHQA,eAAe,CAAfA,eAAe;EAqHvB;EArHQA,eAAe,CAAfA,eAAe;EAwHvB;EAxHQA,eAAe,CAAfA,eAAe;EA2HvB;EA3HQA,eAAe,CAAfA,eAAe;EA8HvB;EA9HQA,eAAe,CAAfA,eAAe;EAiIvB;EAjIQA,eAAe,CAAfA,eAAe;EAoIvB;EApIQA,eAAe,CAAfA,eAAe;EAuIvB;EAvIQA,eAAe,CAAfA,eAAe;EA0IvB;EA1IQA,eAAe,CAAfA,eAAe;EA6IvB;EA7IQA,eAAe,CAAfA,eAAe;EAgJvB;EAhJQA,eAAe,CAAfA,eAAe;EAmJvB;EAnJQA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeCloudX.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;;AAGlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeCloudX.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;;AAGlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuIA,eAAeA,mBAAmB,CAACC,YAAY,CAAO,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PLUGIN_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../src/CloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../src/CloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAC;AAqDtE,eAAO,MAAM,MAAM,EAAE,UAapB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -44,6 +44,8 @@ export declare enum CloudXErrorCode {
|
|
|
44
44
|
ADS_DISABLED = 301,
|
|
45
45
|
/** No ad available (no fill). */
|
|
46
46
|
NO_FILL = 302,
|
|
47
|
+
/** `load` was called while a fullscreen ad is currently being displayed. Wait for the hidden callback. */
|
|
48
|
+
LOAD_NOT_ALLOWED_WHILE_SHOWING = 303,
|
|
47
49
|
/** Ad failed to load. */
|
|
48
50
|
LOAD_FAILED = 304,
|
|
49
51
|
/** Ad is not ready to be shown. */
|
|
@@ -97,6 +99,8 @@ export declare enum CloudXErrorCode {
|
|
|
97
99
|
/** Adapter is missing the required activity (Android) or view controller (iOS). */
|
|
98
100
|
ADAPTER_MISSING_VIEW_CONTROLLER = 620,
|
|
99
101
|
/** Adapter failed to display the ad. */
|
|
100
|
-
ADAPTER_DISPLAY_FAILED = 621
|
|
102
|
+
ADAPTER_DISPLAY_FAILED = 621,
|
|
103
|
+
/** Ad network SDK did not complete initialization within the configured per-adapter timeout. */
|
|
104
|
+
ADAPTER_INITIALIZATION_TIMEOUT = 622
|
|
101
105
|
}
|
|
102
106
|
//# sourceMappingURL=CloudXErrorCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudXErrorCode.d.ts","source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A4B,MAAM;IAIlC,qCAAqC;IACrC,mBAAmB,MAAM;IAIzB,+CAA+C;IAC/C,sBAAsB,MAAM;IAE5B,gCAAgC;IAChC,eAAe,MAAM;IAErB,8CAA8C;IAC9C,0BAA0B,MAAM;IAEhC,4CAA4C;IAC5C,6BAA6B,MAAM;IAEnC,8CAA8C;IAC9C,6BAA6B,MAAM;IAEnC,uCAAuC;IACvC,mBAAmB,MAAM;IAEzB,kCAAkC;IAClC,uBAAuB,MAAM;IAE7B,oCAAoC;IACpC,4BAA4B,MAAM;IAElC,+BAA+B;IAC/B,oBAAoB,MAAM;IAE1B,8BAA8B;IAC9B,oBAAoB,MAAM;IAE1B,mCAAmC;IACnC,eAAe,MAAM;IAErB,yCAAyC;IACzC,qBAAqB,MAAM;IAE3B,4BAA4B;IAC5B,oBAAoB,MAAM;IAE1B,2CAA2C;IAC3C,yBAAyB,MAAM;IAE/B,2CAA2C;IAC3C,+BAA+B,MAAM;IAErC,2CAA2C;IAC3C,qBAAqB,MAAM;IAE3B,8BAA8B;IAC9B,kBAAkB,MAAM;IAExB,sCAAsC;IACtC,2BAA2B,MAAM;IAEjC,4BAA4B;IAC5B,oBAAoB,MAAM;IAE1B,2CAA2C;IAC3C,gCAAgC,MAAM;IAEtC,mFAAmF;IACnF,+BAA+B,MAAM;IAErC,wCAAwC;IACxC,sBAAsB,MAAM;IAE5B,gGAAgG;IAChG,8BAA8B,MAAM;CACvC"}
|
|
@@ -49,6 +49,8 @@ export interface Spec extends TurboModule {
|
|
|
49
49
|
setUserKeyValue(key: string, value: string): void;
|
|
50
50
|
setAppKeyValue(key: string, value: string): void;
|
|
51
51
|
clearAllKeyValues(): void;
|
|
52
|
+
setHasUserConsent(hasUserConsent: boolean | null): void;
|
|
53
|
+
setDoNotSell(isDoNotSell: boolean | null): void;
|
|
52
54
|
createBanner(adUnitId: string, position: string): void;
|
|
53
55
|
createBannerWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number): void;
|
|
54
56
|
setBannerBackgroundColor(adUnitId: string, hexColorString: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeCloudX.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeCloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IAKrC,QAAQ,CAAC,YAAY,EAAE,MAAM;QAEzB,yBAAyB,EAAE,MAAM,CAAC;QAClC,8BAA8B,EAAE,MAAM,CAAC;QACvC,0BAA0B,EAAE,MAAM,CAAC;QACnC,2BAA2B,EAAE,MAAM,CAAC;QACpC,4BAA4B,EAAE,MAAM,CAAC;QACrC,yBAAyB,EAAE,MAAM,CAAC;QAGlC,uBAAuB,EAAE,MAAM,CAAC;QAChC,4BAA4B,EAAE,MAAM,CAAC;QACrC,wBAAwB,EAAE,MAAM,CAAC;QACjC,yBAAyB,EAAE,MAAM,CAAC;QAClC,0BAA0B,EAAE,MAAM,CAAC;QACnC,uBAAuB,EAAE,MAAM,CAAC;QAGhC,4BAA4B,EAAE,MAAM,CAAC;QACrC,iCAAiC,EAAE,MAAM,CAAC;QAC1C,6BAA6B,EAAE,MAAM,CAAC;QACtC,+BAA+B,EAAE,MAAM,CAAC;QACxC,oCAAoC,EAAE,MAAM,CAAC;QAC7C,4BAA4B,EAAE,MAAM,CAAC;QACrC,+BAA+B,EAAE,MAAM,CAAC;QAGxC,2BAA2B,EAAE,MAAM,CAAC;QACpC,gCAAgC,EAAE,MAAM,CAAC;QACzC,4BAA4B,EAAE,MAAM,CAAC;QACrC,8BAA8B,EAAE,MAAM,CAAC;QACvC,mCAAmC,EAAE,MAAM,CAAC;QAC5C,2BAA2B,EAAE,MAAM,CAAC;QACpC,oCAAoC,EAAE,MAAM,CAAC;QAC7C,2BAA2B,EAAE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AE,MAAM,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAChG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAM5C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5F,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAMxC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;;AAED,wBAAgE"}
|
|
@@ -24,5 +24,21 @@ export type CloudXType = {
|
|
|
24
24
|
clearAllKeyValues(): void;
|
|
25
25
|
/** Enables or disables visual debugging overlay (iOS only; no-op on Android). */
|
|
26
26
|
setVisualDebuggingEnabled(enabled: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the GDPR user-consent flag for publishers not using a CMP.
|
|
29
|
+
*
|
|
30
|
+
* Pass `true` if the user has granted consent, `false` if denied, or `null`
|
|
31
|
+
* to clear a previously-set value. If IAB consent strings (GPP/TCF) are
|
|
32
|
+
* present in platform shared preferences, they take priority over this flag.
|
|
33
|
+
*/
|
|
34
|
+
setHasUserConsent(hasUserConsent: boolean | null): void;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the CCPA "do not sell" flag for publishers not using a CMP.
|
|
37
|
+
*
|
|
38
|
+
* Pass `true` if the user opted out of sale, `false` if not, or `null` to
|
|
39
|
+
* clear a previously-set value. IAB consent strings (GPP/US Privacy) take
|
|
40
|
+
* priority when present.
|
|
41
|
+
*/
|
|
42
|
+
setDoNotSell(isDoNotSell: boolean | null): void;
|
|
27
43
|
};
|
|
28
44
|
//# sourceMappingURL=CloudX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../../src/types/CloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,oDAAoD;IACpD,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAElC,yDAAyD;IACzD,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEhE,qDAAqD;IACrD,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7B,6CAA6C;IAC7C,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9B,yDAAyD;IACzD,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEjD,2CAA2C;IAC3C,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5C,sDAAsD;IACtD,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD,sDAAsD;IACtD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjD,uCAAuC;IACvC,iBAAiB,IAAI,IAAI,CAAC;IAE1B,iFAAiF;IACjF,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../../src/types/CloudX.ts"],"names":[],"mappings":"AAAA,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cAAc,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudx-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "React Native wrapper for CloudX SDK (iOS & Android)",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -22,10 +22,6 @@
|
|
|
22
22
|
"!android/.cxx",
|
|
23
23
|
"!ios/build"
|
|
24
24
|
],
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "https://github.com/cloudx-io/cloudx-react-native.git"
|
|
28
|
-
},
|
|
29
25
|
"scripts": {
|
|
30
26
|
"prepare": "bob build",
|
|
31
27
|
"typescript": "tsc --noEmit",
|
|
@@ -49,8 +45,6 @@
|
|
|
49
45
|
},
|
|
50
46
|
"devDependencies": {
|
|
51
47
|
"@types/react": "^18.0.0",
|
|
52
|
-
"react": "^18.0.0",
|
|
53
|
-
"react-native": "^0.76.0",
|
|
54
48
|
"react-native-builder-bob": "^0.20.4",
|
|
55
49
|
"typescript": "^5.2.2"
|
|
56
50
|
},
|
package/src/CloudX.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { CloudXType, CloudXLogLevelValue } from './types/CloudX';
|
|
2
2
|
import type { CloudXInitializationResult } from './types/Configuration';
|
|
3
3
|
import NativeCloudX from './specs/NativeCloudX';
|
|
4
|
-
|
|
5
|
-
const VERSION = '2.0.0';
|
|
4
|
+
import { PLUGIN_VERSION } from './version';
|
|
6
5
|
|
|
7
6
|
const isInitialized = (): Promise<boolean> => {
|
|
8
7
|
return NativeCloudX.isInitialized();
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
const initialize = (appKey: string): Promise<CloudXInitializationResult> => {
|
|
12
|
-
return NativeCloudX.initialize(
|
|
11
|
+
return NativeCloudX.initialize(PLUGIN_VERSION, appKey);
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
const isTablet = (): Promise<boolean> => {
|
|
@@ -44,6 +43,14 @@ const setVisualDebuggingEnabled = (enabled: boolean): void => {
|
|
|
44
43
|
NativeCloudX.setVisualDebuggingEnabled(enabled);
|
|
45
44
|
};
|
|
46
45
|
|
|
46
|
+
const setHasUserConsent = (hasUserConsent: boolean | null): void => {
|
|
47
|
+
NativeCloudX.setHasUserConsent(hasUserConsent);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const setDoNotSell = (isDoNotSell: boolean | null): void => {
|
|
51
|
+
NativeCloudX.setDoNotSell(isDoNotSell);
|
|
52
|
+
};
|
|
53
|
+
|
|
47
54
|
export const CloudX: CloudXType = {
|
|
48
55
|
isInitialized,
|
|
49
56
|
initialize,
|
|
@@ -55,6 +62,8 @@ export const CloudX: CloudXType = {
|
|
|
55
62
|
setAppKeyValue,
|
|
56
63
|
clearAllKeyValues,
|
|
57
64
|
setVisualDebuggingEnabled,
|
|
65
|
+
setHasUserConsent,
|
|
66
|
+
setDoNotSell,
|
|
58
67
|
};
|
|
59
68
|
|
|
60
69
|
export default CloudX;
|
package/src/CloudXErrorCode.ts
CHANGED
|
@@ -68,6 +68,9 @@ export enum CloudXErrorCode {
|
|
|
68
68
|
/** No ad available (no fill). */
|
|
69
69
|
NO_FILL = 302,
|
|
70
70
|
|
|
71
|
+
/** `load` was called while a fullscreen ad is currently being displayed. Wait for the hidden callback. */
|
|
72
|
+
LOAD_NOT_ALLOWED_WHILE_SHOWING = 303,
|
|
73
|
+
|
|
71
74
|
/** Ad failed to load. */
|
|
72
75
|
LOAD_FAILED = 304,
|
|
73
76
|
|
|
@@ -154,4 +157,7 @@ export enum CloudXErrorCode {
|
|
|
154
157
|
|
|
155
158
|
/** Adapter failed to display the ad. */
|
|
156
159
|
ADAPTER_DISPLAY_FAILED = 621,
|
|
160
|
+
|
|
161
|
+
/** Ad network SDK did not complete initialization within the configured per-adapter timeout. */
|
|
162
|
+
ADAPTER_INITIALIZATION_TIMEOUT = 622,
|
|
157
163
|
}
|
|
@@ -78,6 +78,13 @@ export interface Spec extends TurboModule {
|
|
|
78
78
|
setAppKeyValue(key: string, value: string): void;
|
|
79
79
|
clearAllKeyValues(): void;
|
|
80
80
|
|
|
81
|
+
// =========================================================================
|
|
82
|
+
// Privacy (manual, CMP-less fallback)
|
|
83
|
+
// =========================================================================
|
|
84
|
+
|
|
85
|
+
setHasUserConsent(hasUserConsent: boolean | null): void;
|
|
86
|
+
setDoNotSell(isDoNotSell: boolean | null): void;
|
|
87
|
+
|
|
81
88
|
// =========================================================================
|
|
82
89
|
// Banner (Programmatic)
|
|
83
90
|
// =========================================================================
|
package/src/types/CloudX.ts
CHANGED
|
@@ -35,4 +35,22 @@ export type CloudXType = {
|
|
|
35
35
|
|
|
36
36
|
/** Enables or disables visual debugging overlay (iOS only; no-op on Android). */
|
|
37
37
|
setVisualDebuggingEnabled(enabled: boolean): void;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Sets the GDPR user-consent flag for publishers not using a CMP.
|
|
41
|
+
*
|
|
42
|
+
* Pass `true` if the user has granted consent, `false` if denied, or `null`
|
|
43
|
+
* to clear a previously-set value. If IAB consent strings (GPP/TCF) are
|
|
44
|
+
* present in platform shared preferences, they take priority over this flag.
|
|
45
|
+
*/
|
|
46
|
+
setHasUserConsent(hasUserConsent: boolean | null): void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Sets the CCPA "do not sell" flag for publishers not using a CMP.
|
|
50
|
+
*
|
|
51
|
+
* Pass `true` if the user opted out of sale, `false` if not, or `null` to
|
|
52
|
+
* clear a previously-set value. IAB consent strings (GPP/US Privacy) take
|
|
53
|
+
* priority when present.
|
|
54
|
+
*/
|
|
55
|
+
setDoNotSell(isDoNotSell: boolean | null): void;
|
|
38
56
|
};
|
package/src/version.ts
ADDED