@bigcrunch/react-native-ads 0.7.0 → 0.9.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/android/bigcrunch-ads/com/bigcrunch/ads/BigCrunchAds.kt +5 -0
- package/android/bigcrunch-ads/com/bigcrunch/ads/core/BidRequestClient.kt +5 -0
- package/android/bigcrunch-ads/com/bigcrunch/ads/core/ConfigManager.kt +8 -3
- package/android/bigcrunch-ads/com/bigcrunch/ads/core/DeviceContext.kt +1 -1
- package/android/src/main/java/com/bigcrunch/ads/react/BigCrunchAdsModule.kt +5 -3
- package/ios/BigCrunchAds/Sources/BigCrunchAds.swift +5 -0
- package/ios/BigCrunchAds/Sources/Core/AdOrchestrator.swift +2 -2
- package/ios/BigCrunchAds/Sources/Core/BidRequestClient.swift +5 -0
- package/ios/BigCrunchAds/Sources/Core/ConfigManager.swift +11 -4
- package/ios/BigCrunchAds/Sources/Core/DeviceContext.swift +1 -1
- package/ios/BigCrunchAdsModule.swift +3 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/types/index.ts +2 -0
|
@@ -108,6 +108,7 @@ object BigCrunchAds {
|
|
|
108
108
|
* @param propertyId Your BigCrunch property ID
|
|
109
109
|
* @param env Environment (Prod or Staging)
|
|
110
110
|
* @param useMockConfig If true, uses hardcoded mock config for testing (default: false)
|
|
111
|
+
* @param useTestAds If true, uses Google's test ad units instead of production units (default: false)
|
|
111
112
|
* @param callback Optional callback to be notified when initialization is complete
|
|
112
113
|
*/
|
|
113
114
|
fun initialize(
|
|
@@ -115,6 +116,7 @@ object BigCrunchAds {
|
|
|
115
116
|
propertyId: String,
|
|
116
117
|
env: Environment = Environment.Prod,
|
|
117
118
|
useMockConfig: Boolean = false,
|
|
119
|
+
useTestAds: Boolean = false,
|
|
118
120
|
callback: InitializationCallback? = null
|
|
119
121
|
) {
|
|
120
122
|
if (initialized) {
|
|
@@ -160,6 +162,9 @@ object BigCrunchAds {
|
|
|
160
162
|
val baseUrl = "https://pipeline.bigcrunch.com"
|
|
161
163
|
|
|
162
164
|
configManager = ConfigManager(httpClient, storage, moshi)
|
|
165
|
+
if (useTestAds) {
|
|
166
|
+
configManager.useTestAdsOverride = true
|
|
167
|
+
}
|
|
163
168
|
analyticsClient = AnalyticsClient(appContext, httpClient, moshi, baseUrl)
|
|
164
169
|
privacyStore = PrivacyStore(appContext)
|
|
165
170
|
|
|
@@ -54,6 +54,11 @@ internal class BidRequestClient(
|
|
|
54
54
|
* @return Targeting KVPs to apply to GAM request, or null
|
|
55
55
|
*/
|
|
56
56
|
suspend fun fetchDemand(placement: PlacementConfig): Map<String, String>? {
|
|
57
|
+
if (!s2sConfig.enabled) {
|
|
58
|
+
BCLogger.d(TAG, "S2S is disabled, skipping bid request")
|
|
59
|
+
return null
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
val deferred = CompletableDeferred<Map<String, String>?>()
|
|
58
63
|
|
|
59
64
|
mutex.withLock {
|
|
@@ -150,7 +150,7 @@ internal class ConfigManager(
|
|
|
150
150
|
val config = try {
|
|
151
151
|
adapter.fromJson(json)
|
|
152
152
|
} catch (e: Exception) {
|
|
153
|
-
BCLogger.e("ConfigManager", "Failed to parse config JSON", e)
|
|
153
|
+
BCLogger.e("ConfigManager", "Failed to parse config JSON from $url", e)
|
|
154
154
|
null
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -159,6 +159,7 @@ internal class ConfigManager(
|
|
|
159
159
|
saveToStorage(json)
|
|
160
160
|
val placementIds = config.placements.map { it.placementId }
|
|
161
161
|
BCLogger.i("ConfigManager", "Config loaded successfully from network (${config.placements.size} placements): $placementIds")
|
|
162
|
+
BCLogger.v("ConfigManager", "Config JSON: $json")
|
|
162
163
|
Result.success(config)
|
|
163
164
|
} else {
|
|
164
165
|
BCLogger.e("ConfigManager", "Invalid config JSON")
|
|
@@ -168,12 +169,12 @@ internal class ConfigManager(
|
|
|
168
169
|
storedConfig != null -> {
|
|
169
170
|
// Network failed but we have cached version
|
|
170
171
|
val cachedIds = storedConfig.placements.map { it.placementId }
|
|
171
|
-
BCLogger.w("ConfigManager", "
|
|
172
|
+
BCLogger.w("ConfigManager", "Config fetch failed for $url: ${result.exceptionOrNull()?.message}. Using cached config (cached placements: $cachedIds)")
|
|
172
173
|
Result.success(storedConfig)
|
|
173
174
|
}
|
|
174
175
|
else -> {
|
|
175
176
|
// Network failed and no cache available
|
|
176
|
-
BCLogger.e("ConfigManager", "Config load failed and no cache available")
|
|
177
|
+
BCLogger.e("ConfigManager", "Config load failed for $url and no cache available")
|
|
177
178
|
Result.failure(result.exceptionOrNull() ?: Exception("Config load failed"))
|
|
178
179
|
}
|
|
179
180
|
}
|
|
@@ -257,12 +258,16 @@ internal class ConfigManager(
|
|
|
257
258
|
return cachedConfig?.refresh
|
|
258
259
|
}
|
|
259
260
|
|
|
261
|
+
/** Override for useTestAds, set via initialize() options. Takes precedence over config value. */
|
|
262
|
+
var useTestAdsOverride: Boolean? = null
|
|
263
|
+
|
|
260
264
|
/**
|
|
261
265
|
* Check if test ads mode is enabled in config
|
|
262
266
|
*
|
|
263
267
|
* @return true if test ads should be used, false otherwise
|
|
264
268
|
*/
|
|
265
269
|
fun shouldUseTestAds(): Boolean {
|
|
270
|
+
useTestAdsOverride?.let { return it }
|
|
266
271
|
return cachedConfig?.useTestAds ?: false
|
|
267
272
|
}
|
|
268
273
|
|
|
@@ -28,7 +28,7 @@ internal class DeviceContext private constructor(context: Context) {
|
|
|
28
28
|
|
|
29
29
|
companion object {
|
|
30
30
|
private const val TAG = "DeviceContext"
|
|
31
|
-
internal const val SDK_VERSION = "0.
|
|
31
|
+
internal const val SDK_VERSION = "0.9.0"
|
|
32
32
|
|
|
33
33
|
@Volatile
|
|
34
34
|
private var instance: DeviceContext? = null
|
|
@@ -33,13 +33,15 @@ class BigCrunchAdsModule(reactContext: ReactApplicationContext) :
|
|
|
33
33
|
?: throw IllegalArgumentException("propertyId is required")
|
|
34
34
|
val environment = options.getString("environment") ?: "production"
|
|
35
35
|
val debug = if (options.hasKey("debug")) options.getBoolean("debug") else false
|
|
36
|
+
val useMockConfig = if (options.hasKey("useMockConfig")) options.getBoolean("useMockConfig") else false
|
|
37
|
+
val useTestAds = if (options.hasKey("useTestAds")) options.getBoolean("useTestAds") else false
|
|
36
38
|
|
|
37
39
|
// Initialize the native SDK
|
|
38
40
|
val context = reactApplicationContext.applicationContext
|
|
39
41
|
|
|
40
42
|
scope.launch {
|
|
41
43
|
try {
|
|
42
|
-
android.util.Log.d("BigCrunchRNBridge", "initialize() called: propertyId=$propertyId env=$environment mock=$
|
|
44
|
+
android.util.Log.d("BigCrunchRNBridge", "initialize() called: propertyId=$propertyId env=$environment mock=$useMockConfig testAds=$useTestAds")
|
|
43
45
|
|
|
44
46
|
BigCrunchAds.initialize(
|
|
45
47
|
context = context,
|
|
@@ -48,8 +50,8 @@ class BigCrunchAdsModule(reactContext: ReactApplicationContext) :
|
|
|
48
50
|
BigCrunchAds.Environment.Staging
|
|
49
51
|
else
|
|
50
52
|
BigCrunchAds.Environment.Prod,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
useMockConfig = useMockConfig,
|
|
54
|
+
useTestAds = useTestAds
|
|
53
55
|
)
|
|
54
56
|
|
|
55
57
|
android.util.Log.d("BigCrunchRNBridge", "native initialize() returned, isInitialized=${BigCrunchAds.isInitialized()}")
|
|
@@ -62,12 +62,14 @@ public final class BigCrunchAds {
|
|
|
62
62
|
* - propertyId: Your BigCrunch property ID
|
|
63
63
|
* - env: Environment (prod or staging)
|
|
64
64
|
* - useMockConfig: If true, uses hardcoded mock config for testing (default: false)
|
|
65
|
+
* - useTestAds: If true, uses Google's test ad units instead of production units (default: false)
|
|
65
66
|
* - callback: Optional callback to be notified when initialization is complete
|
|
66
67
|
*/
|
|
67
68
|
public static func initialize(
|
|
68
69
|
propertyId: String,
|
|
69
70
|
env: BigCrunchEnv = .prod,
|
|
70
71
|
useMockConfig: Bool = false,
|
|
72
|
+
useTestAds: Bool = false,
|
|
71
73
|
callback: BigCrunchInitializationCallback? = nil
|
|
72
74
|
) {
|
|
73
75
|
if _isInitialized {
|
|
@@ -99,6 +101,9 @@ public final class BigCrunchAds {
|
|
|
99
101
|
let baseURL = "https://pipeline.bigcrunch.com"
|
|
100
102
|
|
|
101
103
|
configManager = ConfigManager(httpClient: httpClient, storage: storage)
|
|
104
|
+
if useTestAds {
|
|
105
|
+
configManager.useTestAdsOverride = true
|
|
106
|
+
}
|
|
102
107
|
analyticsClient = AnalyticsClient(httpClient: httpClient, baseURL: baseURL)
|
|
103
108
|
|
|
104
109
|
// Mark as initialized before async config load
|
|
@@ -422,7 +422,7 @@ internal class AdOrchestrator {
|
|
|
422
422
|
*/
|
|
423
423
|
private class BannerCallbackWrapper {
|
|
424
424
|
let placementId: String
|
|
425
|
-
|
|
425
|
+
var callback: BannerCallback?
|
|
426
426
|
var delegateWrapper: BannerDelegateAdapterWrapper?
|
|
427
427
|
|
|
428
428
|
init(placementId: String, callback: BannerCallback) {
|
|
@@ -436,7 +436,7 @@ private class BannerCallbackWrapper {
|
|
|
436
436
|
*/
|
|
437
437
|
private class InterstitialCallbackWrapper {
|
|
438
438
|
let placementId: String
|
|
439
|
-
|
|
439
|
+
var callback: InterstitialCallback?
|
|
440
440
|
var delegateWrapper: InterstitialDelegateAdapterWrapper?
|
|
441
441
|
|
|
442
442
|
init(placementId: String, callback: InterstitialCallback) {
|
|
@@ -60,6 +60,11 @@ internal class BidRequestClient {
|
|
|
60
60
|
* - Returns: Targeting KVPs to apply to GAM request, or nil
|
|
61
61
|
*/
|
|
62
62
|
func fetchDemand(placement: PlacementConfig) async -> [String: String]? {
|
|
63
|
+
guard s2sConfig.enabled else {
|
|
64
|
+
BCLogger.debug("BidRequestClient: S2S is disabled, skipping bid request")
|
|
65
|
+
return nil
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
return await withCheckedContinuation { continuation in
|
|
64
69
|
lock.lock()
|
|
65
70
|
pendingRequests.append(PendingRequest(
|
|
@@ -149,9 +149,10 @@ internal class ConfigManager {
|
|
|
149
149
|
saveToStorage(json)
|
|
150
150
|
let placementIds = config.placements.map { $0.placementId }
|
|
151
151
|
BCLogger.info("Config loaded successfully from network (\(config.placements.count) placements): \(placementIds)")
|
|
152
|
+
BCLogger.verbose("Config JSON: \(json)")
|
|
152
153
|
return .success(config)
|
|
153
154
|
} catch {
|
|
154
|
-
BCLogger.error("Failed to parse config JSON: \(error)")
|
|
155
|
+
BCLogger.error("Failed to parse config JSON from \(url): \(error)")
|
|
155
156
|
return .failure(error)
|
|
156
157
|
}
|
|
157
158
|
|
|
@@ -159,10 +160,10 @@ internal class ConfigManager {
|
|
|
159
160
|
// Network failed, check for cached version
|
|
160
161
|
if let cached = cachedConfig {
|
|
161
162
|
let cachedIds = cached.placements.map { $0.placementId }
|
|
162
|
-
BCLogger.warning("
|
|
163
|
+
BCLogger.warning("Config fetch failed for \(url): \(error). Using cached config (cached placements: \(cachedIds))")
|
|
163
164
|
return .success(cached)
|
|
164
165
|
} else {
|
|
165
|
-
BCLogger.error("Config load failed and no cache available")
|
|
166
|
+
BCLogger.error("Config load failed for \(url) and no cache available")
|
|
166
167
|
return .failure(error)
|
|
167
168
|
}
|
|
168
169
|
}
|
|
@@ -229,15 +230,21 @@ internal class ConfigManager {
|
|
|
229
230
|
return cachedConfig
|
|
230
231
|
}
|
|
231
232
|
|
|
233
|
+
/// Override for useTestAds, set via initialize() options. Takes precedence over config value.
|
|
234
|
+
var useTestAdsOverride: Bool?
|
|
235
|
+
|
|
232
236
|
/**
|
|
233
237
|
* Check if test ads should be used
|
|
234
238
|
*
|
|
235
|
-
* Returns true if the cached config has useTestAds enabled.
|
|
239
|
+
* Returns true if the override is set, or if the cached config has useTestAds enabled.
|
|
236
240
|
* When true, GoogleAdsAdapter should substitute production ad units with Google's test ad units.
|
|
237
241
|
*
|
|
238
242
|
* - Returns: True if test ads should be used, false otherwise
|
|
239
243
|
*/
|
|
240
244
|
func shouldUseTestAds() -> Bool {
|
|
245
|
+
if let override = useTestAdsOverride {
|
|
246
|
+
return override
|
|
247
|
+
}
|
|
241
248
|
lock.lock()
|
|
242
249
|
defer { lock.unlock() }
|
|
243
250
|
return cachedConfig?.useTestAds ?? false
|
|
@@ -226,12 +226,13 @@ class BigCrunchAdsModule: RCTEventEmitter {
|
|
|
226
226
|
let environment = options["environment"] as? String ?? "production"
|
|
227
227
|
let debug = options["debug"] as? Bool ?? false
|
|
228
228
|
let useMockConfig = options["useMockConfig"] as? Bool ?? false
|
|
229
|
+
let useTestAds = options["useTestAds"] as? Bool ?? false
|
|
229
230
|
|
|
230
231
|
DispatchQueue.main.async {
|
|
231
232
|
// Map environment strings to SDK enum - "sandbox" maps to .staging
|
|
232
233
|
let env: BigCrunchEnv = environment == "sandbox" ? .staging : .prod
|
|
233
234
|
|
|
234
|
-
NSLog("[BigCrunchRNBridge] initialize() called: propertyId=%@ env=%@ mock=%d", propertyId, environment, useMockConfig ? 1 : 0)
|
|
235
|
+
NSLog("[BigCrunchRNBridge] initialize() called: propertyId=%@ env=%@ mock=%d testAds=%d", propertyId, environment, useMockConfig ? 1 : 0, useTestAds ? 1 : 0)
|
|
235
236
|
|
|
236
237
|
// Use callback to wait for config to load before resolving the promise
|
|
237
238
|
// This ensures placements are available when the app starts loading ads
|
|
@@ -253,6 +254,7 @@ class BigCrunchAdsModule: RCTEventEmitter {
|
|
|
253
254
|
propertyId: propertyId,
|
|
254
255
|
env: env,
|
|
255
256
|
useMockConfig: useMockConfig,
|
|
257
|
+
useTestAds: useTestAds,
|
|
256
258
|
callback: callbackBridge
|
|
257
259
|
)
|
|
258
260
|
NSLog("[BigCrunchRNBridge] native initialize() returned, waiting for callback...")
|
package/lib/types/index.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export interface InitializationOptions {
|
|
|
36
36
|
debug?: boolean;
|
|
37
37
|
/** Use mock configuration for testing (no backend required) */
|
|
38
38
|
useMockConfig?: boolean;
|
|
39
|
+
/** Use Google's test ad units instead of production units */
|
|
40
|
+
useTestAds?: boolean;
|
|
39
41
|
/** Custom backend URL (optional) */
|
|
40
42
|
customBackendUrl?: string;
|
|
41
43
|
/** Session timeout in seconds (default: 1800) */
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,cAAc,GACd,kBAAkB,GAClB,aAAa,GACb,aAAa,GACb,UAAU,GACV,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,eAAe,CAAC,EAAE,MAAM,C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ACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcrunch/react-native-ads",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "BigCrunch Mobile Ads SDK for React Native - Simplified in-app advertising with S2S demand and Google Ad Manager",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
package/src/types/index.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface InitializationOptions {
|
|
|
49
49
|
debug?: boolean;
|
|
50
50
|
/** Use mock configuration for testing (no backend required) */
|
|
51
51
|
useMockConfig?: boolean;
|
|
52
|
+
/** Use Google's test ad units instead of production units */
|
|
53
|
+
useTestAds?: boolean;
|
|
52
54
|
/** Custom backend URL (optional) */
|
|
53
55
|
customBackendUrl?: string;
|
|
54
56
|
/** Session timeout in seconds (default: 1800) */
|