@attentive-mobile/attentive-react-native-sdk 2.0.0-beta.2 → 2.0.0-beta.4

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.
@@ -85,6 +85,10 @@ dependencies {
85
85
  implementation 'com.attentive:attentive-android-sdk:1.0.1'
86
86
  implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.10"
87
87
  implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.10"))
88
+
89
+ // OkHttp for networking debugging (optional, only used when debugging is enabled)
90
+ implementation "com.squareup.okhttp3:okhttp:4.12.0"
91
+ implementation "com.squareup.okhttp3:logging-interceptor:4.12.0"
88
92
  }
89
93
 
90
94
  if (isNewArchitectureEnabled()) {
@@ -22,6 +22,7 @@ import com.facebook.react.bridge.ReadableArray
22
22
  import com.facebook.react.bridge.ReadableMap
23
23
  import com.facebook.react.bridge.UiThreadUtil
24
24
  import com.facebook.react.bridge.Promise
25
+ import com.facebook.react.bridge.Callback
25
26
  import com.attentivereactnativesdk.debug.AttentiveDebugHelper
26
27
  import java.math.BigDecimal
27
28
  import java.security.InvalidParameterException
@@ -236,69 +237,356 @@ class AttentiveReactNativeSdkModule(reactContext: ReactApplicationContext) :
236
237
  }
237
238
 
238
239
  // ==========================================================================
239
- // MARK: - Push Notification Methods (Android Implementation - TODO)
240
+ // MARK: - Push Notification Methods (Android Implementation)
240
241
  // ==========================================================================
241
242
  //
242
- // These methods are stubs for Android push notification support.
243
- // Android push notifications typically use Firebase Cloud Messaging (FCM)
244
- // and require different handling than iOS APNs.
243
+ // These methods provide Android push notification support.
244
+ //
245
+ // IMPORTANT NOTE: The Attentive Android SDK version 1.0.1 has limited push notification
246
+ // support compared to version 2.x. These methods provide logging and debugging infrastructure
247
+ // but may require SDK upgrade or custom implementation for full functionality.
245
248
  //
246
- // TODO: Implement Android push notification support
247
- // - Integrate with Firebase Cloud Messaging (FCM)
248
- // - Register FCM token with Attentive backend
249
- // - Handle push notification opens and foreground notifications
250
- // - Consider using the attentive-android-sdk's push notification features if available
251
- //
252
- // Reference: The iOS implementation uses:
253
- // - registerForPushNotifications() - Request permission
254
- // - registerDeviceToken() - Send token to backend
255
- // - handlePushOpened() - Track push open events
256
- // - handleForegroundNotification() - Handle foreground push display
249
+ // The iOS implementation uses APNs; Android uses Firebase Cloud Messaging (FCM).
257
250
  // ==========================================================================
258
251
 
259
252
  /**
260
253
  * Request push notification permission from the user.
261
254
  *
262
- * TODO: Implement for Android
263
- * - For Android 13+ (API 33+), request POST_NOTIFICATIONS permission
264
- * - For older versions, permissions are granted at install time
265
- * - Initialize FCM and get the registration token
255
+ * Note: For Android 13+ (API 33+), you need to request POST_NOTIFICATIONS permission
256
+ * in your app's AndroidManifest.xml and request it at runtime.
257
+ * For older versions, permissions are granted at install time.
258
+ *
259
+ * This method is currently a logging placeholder for parity with iOS.
260
+ * Actual permission handling should be done in the host app.
266
261
  */
267
262
  override fun registerForPushNotifications() {
268
- Log.i(TAG, "[TODO] registerForPushNotifications called - Android implementation pending")
269
- // TODO: Implement Android push notification registration
270
- // 1. Check/request POST_NOTIFICATIONS permission (Android 13+)
271
- // 2. Initialize Firebase Cloud Messaging
272
- // 3. Get FCM registration token
273
- // 4. Register token with Attentive backend
263
+ Log.i(TAG, "📱 [AttentiveSDK] registerForPushNotifications called (Android)")
264
+ Log.i(TAG, " Note: Push notification permissions should be requested in your host app")
265
+ Log.i(TAG, " For Android 13+, request POST_NOTIFICATIONS permission at runtime")
266
+
267
+ if (debugHelper.isDebuggingEnabled()) {
268
+ val debugData = mutableMapOf<String, Any>()
269
+ debugData["platform"] = "Android"
270
+ debugData["sdk_version"] = "1.0.1"
271
+ debugData["note"] = "Permission handling should be done in host app"
272
+ debugHelper.showDebugInfo("Push Registration Requested", debugData)
273
+ }
274
274
  }
275
275
 
276
276
  /**
277
- * Register the device token with the Attentive backend.
277
+ * Register the device token (FCM token) with the Attentive backend.
278
278
  *
279
- * TODO: Implement for Android
280
- * - Android uses FCM tokens instead of APNs tokens
281
- * - Token format and registration endpoint may differ
279
+ * This method attempts to register the FCM push token with the Attentive SDK.
280
+ * Note: The exact API for push token registration may vary by SDK version.
282
281
  *
283
- * @param token The FCM registration token
284
- * @param authorizationStatus Push authorization status (may not apply to Android)
282
+ * @param token The FCM registration token from Firebase
283
+ * @param authorizationStatus Push authorization status (used for consistency with iOS)
285
284
  */
286
285
  override fun registerDeviceToken(token: String, authorizationStatus: String) {
287
- Log.i(TAG, "[TODO] registerDeviceToken called - Android implementation pending")
288
- Log.d(TAG, "Token: ${token.take(16)}..., Status: $authorizationStatus")
289
- // TODO: Implement Android device token registration
290
- // 1. Send FCM token to Attentive backend
291
- // 2. Handle token refresh via FirebaseMessagingService.onNewToken()
286
+ Log.i(TAG, "🎫 [AttentiveSDK] registerDeviceToken called (Android)")
287
+ Log.i(TAG, " Token (preview): ${token.take(16)}...")
288
+ Log.i(TAG, " Token length: ${token.length}")
289
+ Log.i(TAG, " Authorization status: $authorizationStatus")
290
+
291
+ try {
292
+ // Note: Attentive Android SDK 1.0.1 may not have direct push token registration
293
+ // For SDK version 2.x, use: AttentiveConfig.setDeviceToken() or similar
294
+ // For now, we log the token and make it available for custom implementation
295
+
296
+ Log.i(TAG, "⚠️ [AttentiveSDK] Push token registration requires manual implementation")
297
+ Log.i(TAG, " FCM token available: ${token.take(16)}...")
298
+ Log.i(TAG, " Store this token and register it with Attentive backend manually")
299
+ Log.i(TAG, " Or upgrade to Attentive Android SDK 2.x for built-in support")
300
+
301
+ if (debugHelper.isDebuggingEnabled()) {
302
+ val debugData = mutableMapOf<String, Any>()
303
+ debugData["token_preview"] = "${token.take(16)}..."
304
+ debugData["token_length"] = token.length.toString()
305
+ debugData["authorization_status"] = authorizationStatus
306
+ debugData["sdk_version"] = "1.0.1"
307
+ debugData["implementation_status"] = "manual_required"
308
+ debugHelper.showDebugInfo("Device Token (Android)", debugData)
309
+ }
310
+ } catch (e: Exception) {
311
+ Log.e(TAG, "❌ [AttentiveSDK] Error in registerDeviceToken: ${e.message}", e)
312
+
313
+ if (debugHelper.isDebuggingEnabled()) {
314
+ val debugData = mutableMapOf<String, Any>()
315
+ debugData["error"] = e.message ?: "Unknown error"
316
+ debugData["error_type"] = e.javaClass.simpleName
317
+ debugHelper.showDebugInfo("Device Token Registration Error", debugData)
318
+ }
319
+ }
320
+ }
321
+
322
+ /**
323
+ * Register the device token with callback for network response tracking.
324
+ *
325
+ * Note: The Android SDK version 1.0.1 doesn't provide a callback mechanism for
326
+ * push token registration. This method logs the token and invokes the callback
327
+ * immediately for consistency with the iOS API.
328
+ *
329
+ * @param token The FCM registration token
330
+ * @param authorizationStatus Push authorization status
331
+ * @param callback Callback invoked after registration attempt
332
+ */
333
+ override fun registerDeviceTokenWithCallback(
334
+ token: String,
335
+ authorizationStatus: String,
336
+ callback: Callback
337
+ ) {
338
+ Log.i(TAG, "🎫 [AttentiveSDK] registerDeviceTokenWithCallback called (Android)")
339
+ Log.i(TAG, " Token (preview): ${token.take(16)}...")
340
+ Log.i(TAG, " Authorization status: $authorizationStatus")
341
+
342
+ try {
343
+ // Register using the standard method (which logs the token)
344
+ registerDeviceToken(token, authorizationStatus)
345
+
346
+ // Invoke callback immediately with success response
347
+ val responseData = mapOf(
348
+ "success" to true,
349
+ "token" to "${token.take(16)}...",
350
+ "platform" to "Android",
351
+ "sdk_version" to "1.0.1",
352
+ "note" to "Manual push token registration required"
353
+ )
354
+
355
+ // Invoke callback with: data, url, response, error
356
+ callback.invoke(
357
+ responseData, // data
358
+ null, // url (not available in Android SDK)
359
+ mapOf("statusCode" to 200), // response
360
+ null // error
361
+ )
362
+
363
+ Log.i(TAG, "📥 [AttentiveSDK] Callback invoked with success response")
364
+
365
+ if (debugHelper.isDebuggingEnabled()) {
366
+ val debugData = mutableMapOf<String, Any>()
367
+ debugData["token_preview"] = "${token.take(16)}..."
368
+ debugData["authorization_status"] = authorizationStatus
369
+ debugData["callback_invoked"] = "true"
370
+ debugHelper.showDebugInfo("Device Token (with callback)", debugData)
371
+ }
372
+ } catch (e: Exception) {
373
+ Log.e(TAG, "❌ [AttentiveSDK] Error in registerDeviceTokenWithCallback: ${e.message}", e)
374
+
375
+ val errorData = mapOf(
376
+ "code" to 0,
377
+ "message" to (e.message ?: "Unknown error"),
378
+ "type" to e.javaClass.simpleName
379
+ )
380
+
381
+ // Invoke callback with error
382
+ callback.invoke(null, null, null, errorData)
383
+
384
+ if (debugHelper.isDebuggingEnabled()) {
385
+ val debugData = mutableMapOf<String, Any>()
386
+ debugData["error"] = e.message ?: "Unknown error"
387
+ debugData["error_type"] = e.javaClass.simpleName
388
+ debugHelper.showDebugInfo("Device Token Error (callback)", debugData)
389
+ }
390
+ }
391
+ }
392
+
393
+ /**
394
+ * Handle regular/direct app open (not from a push notification).
395
+ *
396
+ * This tracks app open events using the Attentive SDK's event tracking system.
397
+ *
398
+ * @param authorizationStatus Current push authorization status
399
+ */
400
+ override fun handleRegularOpen(authorizationStatus: String) {
401
+ Log.i(TAG, "🌉 [AttentiveSDK] handleRegularOpen called (Android)")
402
+ Log.i(TAG, " Authorization status: $authorizationStatus")
403
+ Log.i(TAG, " Tracking regular app open event...")
404
+
405
+ try {
406
+ // Attentive Android SDK 1.0.1 doesn't have a built-in handleRegularOpen method
407
+ // We can track this as a custom event or use AttentiveEventTracker
408
+
409
+ // Option 1: Track as custom event
410
+ val properties = mapOf(
411
+ "event_type" to "app_open",
412
+ "authorization_status" to authorizationStatus,
413
+ "platform" to "Android"
414
+ )
415
+
416
+ try {
417
+ val customEvent = com.attentive.androidsdk.events.CustomEvent.Builder(
418
+ "app_open",
419
+ properties
420
+ ).build()
421
+
422
+ AttentiveEventTracker.getInstance().recordEvent(customEvent)
423
+
424
+ Log.i(TAG, "✅ [AttentiveSDK] handleRegularOpen completed (tracked as custom event)")
425
+ Log.i(TAG, " Event sent to Attentive backend")
426
+ } catch (e: Exception) {
427
+ Log.w(TAG, "⚠️ [AttentiveSDK] Could not track app open as custom event: ${e.message}")
428
+ Log.i(TAG, " App open tracking requires manual implementation or SDK upgrade")
429
+ }
430
+
431
+ if (debugHelper.isDebuggingEnabled()) {
432
+ val debugData = mutableMapOf<String, Any>()
433
+ debugData["authorization_status"] = authorizationStatus
434
+ debugData["event_type"] = "regular_open"
435
+ debugData["platform"] = "Android"
436
+ debugData["sdk_version"] = "1.0.1"
437
+ debugHelper.showDebugInfo("Regular Open Event", debugData)
438
+ }
439
+ } catch (e: Exception) {
440
+ Log.e(TAG, "❌ [AttentiveSDK] Error in handleRegularOpen: ${e.message}", e)
441
+
442
+ if (debugHelper.isDebuggingEnabled()) {
443
+ val debugData = mutableMapOf<String, Any>()
444
+ debugData["error"] = e.message ?: "Unknown error"
445
+ debugData["error_type"] = e.javaClass.simpleName
446
+ debugHelper.showDebugInfo("Regular Open Error", debugData)
447
+ }
448
+ }
449
+ }
450
+
451
+ /**
452
+ * Handle when a push notification is opened by the user (app in background/inactive state).
453
+ *
454
+ * This tracks push notification open events using the Attentive SDK's event tracking system.
455
+ *
456
+ * @param userInfo The notification payload
457
+ * @param authorizationStatus Current push authorization status
458
+ */
459
+ override fun handlePushOpen(userInfo: ReadableMap, authorizationStatus: String) {
460
+ Log.i(TAG, "🔔 [AttentiveSDK] handlePushOpen called (Android)")
461
+ Log.i(TAG, " Authorization status: $authorizationStatus")
462
+ Log.i(TAG, " User opened push notification while app was in background/inactive")
463
+
464
+ try {
465
+ // Convert ReadableMap to HashMap for processing
466
+ val payload = userInfo.toHashMap()
467
+
468
+ Log.d(TAG, " Notification payload: $payload")
469
+
470
+ // Track push open as custom event
471
+ val properties = mutableMapOf<String, String>()
472
+ properties["event_type"] = "push_open"
473
+ properties["authorization_status"] = authorizationStatus
474
+ properties["platform"] = "Android"
475
+
476
+ // Add notification payload to properties (converting to strings)
477
+ payload.forEach { (key, value) ->
478
+ properties["notification_$key"] = value?.toString() ?: "null"
479
+ }
480
+
481
+ try {
482
+ val customEvent = com.attentive.androidsdk.events.CustomEvent.Builder(
483
+ "push_open",
484
+ properties
485
+ ).build()
486
+
487
+ AttentiveEventTracker.getInstance().recordEvent(customEvent)
488
+
489
+ Log.i(TAG, "✅ [AttentiveSDK] handlePushOpen completed (tracked as custom event)")
490
+ Log.i(TAG, " Push open event sent to Attentive backend")
491
+ } catch (e: Exception) {
492
+ Log.w(TAG, "⚠️ [AttentiveSDK] Could not track push open as custom event: ${e.message}")
493
+ Log.i(TAG, " Push open tracking requires manual implementation or SDK upgrade")
494
+ }
495
+
496
+ if (debugHelper.isDebuggingEnabled()) {
497
+ val debugData = mutableMapOf<String, Any>()
498
+ debugData["authorization_status"] = authorizationStatus
499
+ debugData["event_type"] = "push_open"
500
+ debugData["platform"] = "Android"
501
+ debugData["payload_keys"] = payload.keys.joinToString(", ")
502
+ debugData["sdk_version"] = "1.0.1"
503
+ debugHelper.showDebugInfo("Push Open Event", debugData)
504
+ }
505
+ } catch (e: Exception) {
506
+ Log.e(TAG, "❌ [AttentiveSDK] Error in handlePushOpen: ${e.message}", e)
507
+
508
+ if (debugHelper.isDebuggingEnabled()) {
509
+ val debugData = mutableMapOf<String, Any>()
510
+ debugData["error"] = e.message ?: "Unknown error"
511
+ debugData["error_type"] = e.javaClass.simpleName
512
+ debugHelper.showDebugInfo("Push Open Error", debugData)
513
+ }
514
+ }
292
515
  }
293
516
 
294
517
  /**
295
- * Handle when a push notification is opened by the user.
518
+ * Handle a push notification when the app is in the foreground (active state).
296
519
  *
297
- * TODO: Implement for Android
298
- * - Track push open events with Attentive
299
- * - Handle deep linking if present in payload
520
+ * This tracks foreground push notification events using the Attentive SDK's event tracking system.
300
521
  *
301
- * @param userInfo The notification payload (from FCM RemoteMessage data)
522
+ * @param userInfo The notification payload
523
+ * @param authorizationStatus Current push authorization status
524
+ */
525
+ override fun handleForegroundPush(userInfo: ReadableMap, authorizationStatus: String) {
526
+ Log.i(TAG, "📱 [AttentiveSDK] handleForegroundPush called (Android)")
527
+ Log.i(TAG, " Authorization status: $authorizationStatus")
528
+ Log.i(TAG, " Push received while app was in foreground (active)")
529
+
530
+ try {
531
+ // Convert ReadableMap to HashMap for processing
532
+ val payload = userInfo.toHashMap()
533
+
534
+ Log.d(TAG, " Notification payload: $payload")
535
+
536
+ // Track foreground push as custom event
537
+ val properties = mutableMapOf<String, String>()
538
+ properties["event_type"] = "foreground_push"
539
+ properties["authorization_status"] = authorizationStatus
540
+ properties["platform"] = "Android"
541
+
542
+ // Add notification payload to properties (converting to strings)
543
+ payload.forEach { (key, value) ->
544
+ properties["notification_$key"] = value?.toString() ?: "null"
545
+ }
546
+
547
+ try {
548
+ val customEvent = com.attentive.androidsdk.events.CustomEvent.Builder(
549
+ "foreground_push",
550
+ properties
551
+ ).build()
552
+
553
+ AttentiveEventTracker.getInstance().recordEvent(customEvent)
554
+
555
+ Log.i(TAG, "✅ [AttentiveSDK] handleForegroundPush completed (tracked as custom event)")
556
+ Log.i(TAG, " Foreground push event sent to Attentive backend")
557
+ } catch (e: Exception) {
558
+ Log.w(TAG, "⚠️ [AttentiveSDK] Could not track foreground push as custom event: ${e.message}")
559
+ Log.i(TAG, " Foreground push tracking requires manual implementation or SDK upgrade")
560
+ }
561
+
562
+ if (debugHelper.isDebuggingEnabled()) {
563
+ val debugData = mutableMapOf<String, Any>()
564
+ debugData["authorization_status"] = authorizationStatus
565
+ debugData["event_type"] = "foreground_push"
566
+ debugData["platform"] = "Android"
567
+ debugData["payload_keys"] = payload.keys.joinToString(", ")
568
+ debugData["sdk_version"] = "1.0.1"
569
+ debugHelper.showDebugInfo("Foreground Push Event", debugData)
570
+ }
571
+ } catch (e: Exception) {
572
+ Log.e(TAG, "❌ [AttentiveSDK] Error in handleForegroundPush: ${e.message}", e)
573
+
574
+ if (debugHelper.isDebuggingEnabled()) {
575
+ val debugData = mutableMapOf<String, Any>()
576
+ debugData["error"] = e.message ?: "Unknown error"
577
+ debugData["error_type"] = e.javaClass.simpleName
578
+ debugHelper.showDebugInfo("Foreground Push Error", debugData)
579
+ }
580
+ }
581
+ }
582
+
583
+ /**
584
+ * Handle when a push notification is opened by the user (legacy method).
585
+ *
586
+ * This is kept for backward compatibility with the iOS implementation.
587
+ * For new code, prefer using handlePushOpen or handleForegroundPush based on app state.
588
+ *
589
+ * @param userInfo The notification payload
302
590
  * @param applicationState App state when notification was opened
303
591
  * @param authorizationStatus Push authorization status
304
592
  */
@@ -307,30 +595,42 @@ class AttentiveReactNativeSdkModule(reactContext: ReactApplicationContext) :
307
595
  applicationState: String,
308
596
  authorizationStatus: String
309
597
  ) {
310
- Log.i(TAG, "[TODO] handlePushOpened called - Android implementation pending")
311
- Log.d(TAG, "App state: $applicationState, Auth status: $authorizationStatus")
312
- // TODO: Implement Android push open tracking
313
- // 1. Parse notification payload
314
- // 2. Send push open event to Attentive backend
315
- // 3. Handle any deep links in the payload
598
+ Log.i(TAG, "🔔 [AttentiveSDK] handlePushOpened called (Android - legacy method)")
599
+ Log.i(TAG, " App state: $applicationState")
600
+ Log.i(TAG, " Authorization status: $authorizationStatus")
601
+
602
+ // Route to the appropriate method based on application state
603
+ when (applicationState.lowercase()) {
604
+ "active" -> {
605
+ Log.i(TAG, " Routing to handleForegroundPush")
606
+ handleForegroundPush(userInfo, authorizationStatus)
607
+ }
608
+ "background", "inactive" -> {
609
+ Log.i(TAG, " Routing to handlePushOpen")
610
+ handlePushOpen(userInfo, authorizationStatus)
611
+ }
612
+ else -> {
613
+ Log.w(TAG, " Unknown application state, defaulting to handlePushOpen")
614
+ handlePushOpen(userInfo, authorizationStatus)
615
+ }
616
+ }
316
617
  }
317
618
 
318
619
  /**
319
- * Handle when a push notification arrives while the app is in foreground.
620
+ * Handle when a push notification arrives while the app is in foreground (legacy method).
320
621
  *
321
- * TODO: Implement for Android
322
- * - Android handles foreground notifications differently than iOS
323
- * - By default, FCM data messages don't show UI in foreground
324
- * - Need to create NotificationCompat.Builder to show notification
622
+ * This is kept for backward compatibility with the iOS implementation.
623
+ * For new code, prefer using handleForegroundPush.
325
624
  *
326
625
  * @param userInfo The notification payload
327
626
  */
328
627
  override fun handleForegroundNotification(userInfo: ReadableMap) {
329
- Log.i(TAG, "[TODO] handleForegroundNotification called - Android implementation pending")
330
- // TODO: Implement Android foreground notification handling
331
- // 1. Create notification channel (required for Android 8+)
332
- // 2. Build and display notification using NotificationCompat
333
- // 3. Track foreground notification event with Attentive
628
+ Log.i(TAG, "📱 [AttentiveSDK] handleForegroundNotification called (Android - legacy method)")
629
+ Log.i(TAG, " Routing to handleForegroundPush with default authorization status")
630
+
631
+ // Route to handleForegroundPush with a default authorization status
632
+ // Note: Authorization status is less relevant on Android than iOS
633
+ handleForegroundPush(userInfo, "authorized")
334
634
  }
335
635
 
336
636
  private fun convertToStringMap(inputMap: Map<String, Any?>): Map<String, String> {
@@ -0,0 +1,220 @@
1
+ package com.attentivereactnativesdk.debug
2
+
3
+ import android.util.Log
4
+ import okhttp3.*
5
+ import okhttp3.logging.HttpLoggingInterceptor
6
+ import java.io.IOException
7
+ import java.util.concurrent.TimeUnit
8
+
9
+ /**
10
+ * Networking helper for debugging HTTP requests made by the Attentive SDK.
11
+ *
12
+ * This class provides:
13
+ * - HTTP request/response logging
14
+ * - Network call tracking for debugging
15
+ * - Integration with the debug overlay
16
+ *
17
+ * Note: This is for debugging purposes only and should be disabled in production builds.
18
+ */
19
+ class NetworkingHelper(private val debugHelper: AttentiveDebugHelper) {
20
+
21
+ companion object {
22
+ private const val TAG = "AttentiveNetworking"
23
+
24
+ /**
25
+ * Creates an OkHttpClient with logging interceptor for debugging network calls.
26
+ * This can be used to wrap network requests and log all traffic.
27
+ *
28
+ * @param enableLogging Whether to enable detailed HTTP logging
29
+ * @return Configured OkHttpClient instance
30
+ */
31
+ fun createDebugClient(enableLogging: Boolean = true): OkHttpClient {
32
+ val builder = OkHttpClient.Builder()
33
+ .connectTimeout(30, TimeUnit.SECONDS)
34
+ .readTimeout(30, TimeUnit.SECONDS)
35
+ .writeTimeout(30, TimeUnit.SECONDS)
36
+
37
+ if (enableLogging) {
38
+ val loggingInterceptor = HttpLoggingInterceptor { message ->
39
+ Log.d(TAG, "🌐 [HTTP] $message")
40
+ }.apply {
41
+ level = HttpLoggingInterceptor.Level.BODY
42
+ }
43
+
44
+ builder.addInterceptor(loggingInterceptor)
45
+ }
46
+
47
+ return builder.build()
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Logs a network request for debugging purposes.
53
+ *
54
+ * @param url The request URL
55
+ * @param method The HTTP method (GET, POST, etc.)
56
+ * @param headers Request headers
57
+ * @param body Request body (if any)
58
+ */
59
+ fun logRequest(
60
+ url: String,
61
+ method: String,
62
+ headers: Map<String, String>? = null,
63
+ body: String? = null
64
+ ) {
65
+ Log.i(TAG, "📤 [Network Request]")
66
+ Log.i(TAG, " Method: $method")
67
+ Log.i(TAG, " URL: $url")
68
+
69
+ headers?.let {
70
+ Log.d(TAG, " Headers:")
71
+ it.forEach { (key, value) ->
72
+ Log.d(TAG, " $key: $value")
73
+ }
74
+ }
75
+
76
+ body?.let {
77
+ Log.d(TAG, " Body: $it")
78
+ }
79
+
80
+ if (debugHelper.isDebuggingEnabled()) {
81
+ val debugData = mutableMapOf<String, Any>()
82
+ debugData["request_method"] = method
83
+ debugData["request_url"] = url
84
+ headers?.let { debugData["headers_count"] = it.size.toString() }
85
+ body?.let { debugData["body_length"] = it.length.toString() }
86
+
87
+ debugHelper.showDebugInfo("Network Request", debugData)
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Logs a network response for debugging purposes.
93
+ *
94
+ * @param url The request URL
95
+ * @param statusCode HTTP status code
96
+ * @param headers Response headers
97
+ * @param body Response body (if any)
98
+ * @param durationMs Request duration in milliseconds
99
+ */
100
+ fun logResponse(
101
+ url: String,
102
+ statusCode: Int,
103
+ headers: Map<String, String>? = null,
104
+ body: String? = null,
105
+ durationMs: Long? = null
106
+ ) {
107
+ val statusEmoji = when {
108
+ statusCode in 200..299 -> "✅"
109
+ statusCode in 300..399 -> "↪️"
110
+ statusCode in 400..499 -> "⚠️"
111
+ statusCode >= 500 -> "❌"
112
+ else -> "❓"
113
+ }
114
+
115
+ Log.i(TAG, "📥 [Network Response] $statusEmoji")
116
+ Log.i(TAG, " URL: $url")
117
+ Log.i(TAG, " Status: $statusCode")
118
+ durationMs?.let { Log.i(TAG, " Duration: ${it}ms") }
119
+
120
+ headers?.let {
121
+ Log.d(TAG, " Headers:")
122
+ it.forEach { (key, value) ->
123
+ Log.d(TAG, " $key: $value")
124
+ }
125
+ }
126
+
127
+ body?.let {
128
+ Log.d(TAG, " Body: ${it.take(500)}${if (it.length > 500) "..." else ""}")
129
+ }
130
+
131
+ if (debugHelper.isDebuggingEnabled()) {
132
+ val debugData = mutableMapOf<String, Any>()
133
+ debugData["response_status"] = statusCode.toString()
134
+ debugData["response_url"] = url
135
+ debugData["status_emoji"] = statusEmoji
136
+ headers?.let { debugData["headers_count"] = it.size.toString() }
137
+ body?.let { debugData["body_length"] = it.length.toString() }
138
+ durationMs?.let { debugData["duration_ms"] = it.toString() }
139
+
140
+ debugHelper.showDebugInfo("Network Response", debugData)
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Logs a network error for debugging purposes.
146
+ *
147
+ * @param url The request URL
148
+ * @param error The error that occurred
149
+ * @param durationMs Request duration in milliseconds (if applicable)
150
+ */
151
+ fun logError(
152
+ url: String,
153
+ error: Throwable,
154
+ durationMs: Long? = null
155
+ ) {
156
+ Log.e(TAG, "❌ [Network Error]")
157
+ Log.e(TAG, " URL: $url")
158
+ Log.e(TAG, " Error: ${error.message}")
159
+ durationMs?.let { Log.e(TAG, " Duration: ${it}ms") }
160
+ Log.e(TAG, " Exception:", error)
161
+
162
+ if (debugHelper.isDebuggingEnabled()) {
163
+ val debugData = mutableMapOf<String, Any>()
164
+ debugData["error_url"] = url
165
+ debugData["error_message"] = error.message ?: "Unknown error"
166
+ debugData["error_type"] = error.javaClass.simpleName
167
+ durationMs?.let { debugData["duration_ms"] = it.toString() }
168
+
169
+ debugHelper.showDebugInfo("Network Error", debugData)
170
+ }
171
+ }
172
+
173
+ /**
174
+ * Creates an interceptor that can be added to OkHttpClient for automatic logging.
175
+ * This is useful for transparently logging all SDK network calls.
176
+ *
177
+ * @return An OkHttp Interceptor for network logging
178
+ */
179
+ fun createLoggingInterceptor(): Interceptor {
180
+ return Interceptor { chain ->
181
+ val request = chain.request()
182
+ val startTime = System.currentTimeMillis()
183
+
184
+ // Log request
185
+ logRequest(
186
+ url = request.url.toString(),
187
+ method = request.method,
188
+ headers = request.headers.toMultimap().mapValues { it.value.firstOrNull() ?: "" },
189
+ body = request.body?.toString()
190
+ )
191
+
192
+ try {
193
+ val response = chain.proceed(request)
194
+ val duration = System.currentTimeMillis() - startTime
195
+
196
+ // Log response
197
+ logResponse(
198
+ url = request.url.toString(),
199
+ statusCode = response.code,
200
+ headers = response.headers.toMultimap().mapValues { it.value.firstOrNull() ?: "" },
201
+ body = response.peekBody(1024).string(),
202
+ durationMs = duration
203
+ )
204
+
205
+ response
206
+ } catch (e: IOException) {
207
+ val duration = System.currentTimeMillis() - startTime
208
+
209
+ // Log error
210
+ logError(
211
+ url = request.url.toString(),
212
+ error = e,
213
+ durationMs = duration
214
+ )
215
+
216
+ throw e
217
+ }
218
+ }
219
+ }
220
+ }
@@ -181,27 +181,6 @@ customIdentifiers:(NSDictionary *)customIdentifiers {
181
181
  [_sdk handlePushOpenFromRN:userInfo authorizationStatus:authorizationStatus];
182
182
  }
183
183
 
184
- // Helper method to convert string to UNAuthorizationStatus
185
- - (UNAuthorizationStatus)authorizationStatusFromString:(NSString *)statusString {
186
- if ([statusString isEqualToString:@"authorized"]) {
187
- return UNAuthorizationStatusAuthorized;
188
- } else if ([statusString isEqualToString:@"denied"]) {
189
- return UNAuthorizationStatusDenied;
190
- } else if ([statusString isEqualToString:@"notDetermined"]) {
191
- return UNAuthorizationStatusNotDetermined;
192
- } else if ([statusString isEqualToString:@"provisional"]) {
193
- if (@available(iOS 12.0, *)) {
194
- return UNAuthorizationStatusProvisional;
195
- }
196
- return UNAuthorizationStatusNotDetermined;
197
- } else if ([statusString isEqualToString:@"ephemeral"]) {
198
- if (@available(iOS 14.0, *)) {
199
- return UNAuthorizationStatusEphemeral;
200
- }
201
- return UNAuthorizationStatusNotDetermined;
202
- }
203
- return UNAuthorizationStatusNotDetermined;
204
- }
205
184
 
206
185
  - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
207
186
  (const facebook::react::ObjCTurboModule::InitParams &)params
@@ -334,6 +313,28 @@ customIdentifiers:(NSDictionary *)customIdentifiers {
334
313
  }
335
314
  #endif
336
315
 
316
+
317
+ // Helper method to convert string to UNAuthorizationStatus
318
+ - (UNAuthorizationStatus)authorizationStatusFromString:(NSString *)statusString {
319
+ if ([statusString isEqualToString:@"authorized"]) {
320
+ return UNAuthorizationStatusAuthorized;
321
+ } else if ([statusString isEqualToString:@"denied"]) {
322
+ return UNAuthorizationStatusDenied;
323
+ } else if ([statusString isEqualToString:@"notDetermined"]) {
324
+ return UNAuthorizationStatusNotDetermined;
325
+ } else if ([statusString isEqualToString:@"provisional"]) {
326
+ if (@available(iOS 12.0, *)) {
327
+ return UNAuthorizationStatusProvisional;
328
+ }
329
+ return UNAuthorizationStatusNotDetermined;
330
+ } else if ([statusString isEqualToString:@"ephemeral"]) {
331
+ if (@available(iOS 14.0, *)) {
332
+ return UNAuthorizationStatusEphemeral;
333
+ }
334
+ return UNAuthorizationStatusNotDetermined;
335
+ }
336
+ return UNAuthorizationStatusNotDetermined;
337
+ }
337
338
  - (void)triggerCreative:(NSString *)creativeId {
338
339
  dispatch_async(dispatch_get_main_queue(), ^{
339
340
  UIWindow *window = [[UIApplication sharedApplication] keyWindow];
@@ -349,6 +350,7 @@ customIdentifiers:(NSDictionary *)customIdentifiers {
349
350
  - (void)destroyCreative {
350
351
  dispatch_async(dispatch_get_main_queue(), ^{
351
352
  // [self->_sdk closeCreative]
353
+ [self->_sdk notifyCreativeDestroyed];
352
354
  });
353
355
  }
354
356
 
@@ -8,7 +8,9 @@
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
10
  58F287A429D7860100C7DF09 /* AttentiveReactNativeSdk.mm in Sources */ = {isa = PBXBuildFile; fileRef = 58F2879D29D7860000C7DF09 /* AttentiveReactNativeSdk.mm */; };
11
+ 7FC30FA61B6E0426001A4BCC /* libPods-AttentiveReactNativeSdk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CABAEF39FD802FFF9317045 /* libPods-AttentiveReactNativeSdk.a */; };
11
12
  FBED3EEA2C2F3F3900E7D5EB /* ATTNNativeSDK.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBED3EE92C2F3F3900E7D5EB /* ATTNNativeSDK.swift */; };
13
+ 5C622475A2F0B4C034C942DD /* AttentiveSDKManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68A0D5612CE7FA50664CB37B /* AttentiveSDKManager.swift */; };
12
14
  /* End PBXBuildFile section */
13
15
 
14
16
  /* Begin PBXCopyFilesBuildPhase section */
@@ -25,11 +27,15 @@
25
27
 
26
28
  /* Begin PBXFileReference section */
27
29
  134814201AA4EA6300B7C361 /* libAttentiveReactNativeSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAttentiveReactNativeSdk.a; sourceTree = BUILT_PRODUCTS_DIR; };
30
+ 33355F3FC1852AA82C07D693 /* Pods-AttentiveReactNativeSdk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AttentiveReactNativeSdk.debug.xcconfig"; path = "Target Support Files/Pods-AttentiveReactNativeSdk/Pods-AttentiveReactNativeSdk.debug.xcconfig"; sourceTree = "<group>"; };
28
31
  58F2879C29D7860000C7DF09 /* attentive-sdk-umbrella.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "attentive-sdk-umbrella.h"; sourceTree = "<group>"; };
29
32
  58F2879D29D7860000C7DF09 /* AttentiveReactNativeSdk.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AttentiveReactNativeSdk.mm; sourceTree = "<group>"; };
33
+ 6CABAEF39FD802FFF9317045 /* libPods-AttentiveReactNativeSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AttentiveReactNativeSdk.a"; sourceTree = BUILT_PRODUCTS_DIR; };
34
+ 949D2E1F5D8BA4C00733B1FD /* Pods-AttentiveReactNativeSdk.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AttentiveReactNativeSdk.release.xcconfig"; path = "Target Support Files/Pods-AttentiveReactNativeSdk/Pods-AttentiveReactNativeSdk.release.xcconfig"; sourceTree = "<group>"; };
30
35
  B3E7B5881CC2AC0600A0062D /* AttentiveReactNativeSdk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttentiveReactNativeSdk.h; sourceTree = "<group>"; };
31
36
  FBED3EE82C2F3F3900E7D5EB /* AttentiveReactNativeSdk-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AttentiveReactNativeSdk-Bridging-Header.h"; sourceTree = "<group>"; };
32
37
  FBED3EE92C2F3F3900E7D5EB /* ATTNNativeSDK.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ATTNNativeSDK.swift; sourceTree = "<group>"; };
38
+ 68A0D5612CE7FA50664CB37B /* AttentiveSDKManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttentiveSDKManager.swift; sourceTree = "<group>"; };
33
39
  FBED3EEB2C2F413D00E7D5EB /* attentive-react-native-sdk.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = "attentive-react-native-sdk.podspec"; path = "../attentive-react-native-sdk.podspec"; sourceTree = "<group>"; };
34
40
  /* End PBXFileReference section */
35
41
 
@@ -38,6 +44,7 @@
38
44
  isa = PBXFrameworksBuildPhase;
39
45
  buildActionMask = 2147483647;
40
46
  files = (
47
+ 7FC30FA61B6E0426001A4BCC /* libPods-AttentiveReactNativeSdk.a in Frameworks */,
41
48
  );
42
49
  runOnlyForDeploymentPostprocessing = 0;
43
50
  };
@@ -52,6 +59,14 @@
52
59
  name = Products;
53
60
  sourceTree = "<group>";
54
61
  };
62
+ 45BE13C5EF781B9439E0E17D /* Frameworks */ = {
63
+ isa = PBXGroup;
64
+ children = (
65
+ 6CABAEF39FD802FFF9317045 /* libPods-AttentiveReactNativeSdk.a */,
66
+ );
67
+ name = Frameworks;
68
+ sourceTree = "<group>";
69
+ };
55
70
  58B511D21A9E6C8500147676 = {
56
71
  isa = PBXGroup;
57
72
  children = (
@@ -62,12 +77,15 @@
62
77
  58F2879D29D7860000C7DF09 /* AttentiveReactNativeSdk.mm */,
63
78
  134814211AA4EA7D00B7C361 /* Products */,
64
79
  5F65DBE5DB1751003CF3E431 /* Pods */,
80
+ 45BE13C5EF781B9439E0E17D /* Frameworks */,
65
81
  );
66
82
  sourceTree = "<group>";
67
83
  };
68
84
  5F65DBE5DB1751003CF3E431 /* Pods */ = {
69
85
  isa = PBXGroup;
70
86
  children = (
87
+ 33355F3FC1852AA82C07D693 /* Pods-AttentiveReactNativeSdk.debug.xcconfig */,
88
+ 949D2E1F5D8BA4C00733B1FD /* Pods-AttentiveReactNativeSdk.release.xcconfig */,
71
89
  );
72
90
  path = Pods;
73
91
  sourceTree = "<group>";
@@ -76,6 +94,7 @@
76
94
  isa = PBXGroup;
77
95
  children = (
78
96
  FBED3EE92C2F3F3900E7D5EB /* ATTNNativeSDK.swift */,
97
+ 68A0D5612CE7FA50664CB37B /* AttentiveSDKManager.swift */,
79
98
  FBED3EE82C2F3F3900E7D5EB /* AttentiveReactNativeSdk-Bridging-Header.h */,
80
99
  );
81
100
  path = Bridging;
@@ -88,6 +107,7 @@
88
107
  isa = PBXNativeTarget;
89
108
  buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "AttentiveReactNativeSdk" */;
90
109
  buildPhases = (
110
+ 75E06E153E35C6A0B50E809C /* [CP] Check Pods Manifest.lock */,
91
111
  58B511D71A9E6C8500147676 /* Sources */,
92
112
  58B511D81A9E6C8500147676 /* Frameworks */,
93
113
  58B511D91A9E6C8500147676 /* CopyFiles */,
@@ -134,12 +154,38 @@
134
154
  };
135
155
  /* End PBXProject section */
136
156
 
157
+ /* Begin PBXShellScriptBuildPhase section */
158
+ 75E06E153E35C6A0B50E809C /* [CP] Check Pods Manifest.lock */ = {
159
+ isa = PBXShellScriptBuildPhase;
160
+ buildActionMask = 2147483647;
161
+ files = (
162
+ );
163
+ inputFileListPaths = (
164
+ );
165
+ inputPaths = (
166
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
167
+ "${PODS_ROOT}/Manifest.lock",
168
+ );
169
+ name = "[CP] Check Pods Manifest.lock";
170
+ outputFileListPaths = (
171
+ );
172
+ outputPaths = (
173
+ "$(DERIVED_FILE_DIR)/Pods-AttentiveReactNativeSdk-checkManifestLockResult.txt",
174
+ );
175
+ runOnlyForDeploymentPostprocessing = 0;
176
+ shellPath = /bin/sh;
177
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
178
+ showEnvVarsInLog = 0;
179
+ };
180
+ /* End PBXShellScriptBuildPhase section */
181
+
137
182
  /* Begin PBXSourcesBuildPhase section */
138
183
  58B511D71A9E6C8500147676 /* Sources */ = {
139
184
  isa = PBXSourcesBuildPhase;
140
185
  buildActionMask = 2147483647;
141
186
  files = (
142
187
  FBED3EEA2C2F3F3900E7D5EB /* ATTNNativeSDK.swift in Sources */,
188
+ 5C622475A2F0B4C034C942DD /* AttentiveSDKManager.swift in Sources */,
143
189
  58F287A429D7860100C7DF09 /* AttentiveReactNativeSdk.mm in Sources */,
144
190
  );
145
191
  runOnlyForDeploymentPostprocessing = 0;
@@ -151,7 +197,8 @@
151
197
  isa = XCBuildConfiguration;
152
198
  buildSettings = {
153
199
  ALWAYS_SEARCH_USER_PATHS = NO;
154
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
200
+ CC = "";
201
+ CLANG_CXX_LANGUAGE_STANDARD = "c++20";
155
202
  CLANG_CXX_LIBRARY = "libc++";
156
203
  CLANG_ENABLE_MODULES = YES;
157
204
  CLANG_ENABLE_OBJC_ARC = YES;
@@ -173,6 +220,7 @@
173
220
  CLANG_WARN_UNREACHABLE_CODE = YES;
174
221
  CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
175
222
  COPY_PHASE_STRIP = NO;
223
+ CXX = "";
176
224
  ENABLE_STRICT_OBJC_MSGSEND = YES;
177
225
  ENABLE_TESTABILITY = YES;
178
226
  "EXCLUDED_ARCHS[sdk=*]" = arm64;
@@ -194,6 +242,8 @@
194
242
  GCC_WARN_UNUSED_FUNCTION = YES;
195
243
  GCC_WARN_UNUSED_VARIABLE = YES;
196
244
  IPHONEOS_DEPLOYMENT_TARGET = 14.0;
245
+ LD = "";
246
+ LDPLUSPLUS = "";
197
247
  MTL_ENABLE_DEBUG_INFO = YES;
198
248
  ONLY_ACTIVE_ARCH = YES;
199
249
  OTHER_LDFLAGS = (
@@ -202,6 +252,8 @@
202
252
  );
203
253
  REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
204
254
  SDKROOT = iphoneos;
255
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
256
+ USE_HERMES = true;
205
257
  };
206
258
  name = Debug;
207
259
  };
@@ -209,7 +261,8 @@
209
261
  isa = XCBuildConfiguration;
210
262
  buildSettings = {
211
263
  ALWAYS_SEARCH_USER_PATHS = NO;
212
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
264
+ CC = "";
265
+ CLANG_CXX_LANGUAGE_STANDARD = "c++20";
213
266
  CLANG_CXX_LIBRARY = "libc++";
214
267
  CLANG_ENABLE_MODULES = YES;
215
268
  CLANG_ENABLE_OBJC_ARC = YES;
@@ -231,6 +284,7 @@
231
284
  CLANG_WARN_UNREACHABLE_CODE = YES;
232
285
  CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233
286
  COPY_PHASE_STRIP = YES;
287
+ CXX = "";
234
288
  ENABLE_NS_ASSERTIONS = NO;
235
289
  ENABLE_STRICT_OBJC_MSGSEND = YES;
236
290
  "EXCLUDED_ARCHS[sdk=*]" = arm64;
@@ -248,6 +302,8 @@
248
302
  GCC_WARN_UNUSED_FUNCTION = YES;
249
303
  GCC_WARN_UNUSED_VARIABLE = YES;
250
304
  IPHONEOS_DEPLOYMENT_TARGET = 14.0;
305
+ LD = "";
306
+ LDPLUSPLUS = "";
251
307
  MTL_ENABLE_DEBUG_INFO = NO;
252
308
  OTHER_LDFLAGS = (
253
309
  "$(inherited)",
@@ -255,12 +311,14 @@
255
311
  );
256
312
  REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
257
313
  SDKROOT = iphoneos;
314
+ USE_HERMES = true;
258
315
  VALIDATE_PRODUCT = YES;
259
316
  };
260
317
  name = Release;
261
318
  };
262
319
  58B511F01A9E6C8500147676 /* Debug */ = {
263
320
  isa = XCBuildConfiguration;
321
+ baseConfigurationReference = 33355F3FC1852AA82C07D693 /* Pods-AttentiveReactNativeSdk.debug.xcconfig */;
264
322
  buildSettings = {
265
323
  ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
266
324
  CLANG_ENABLE_MODULES = YES;
@@ -284,6 +342,7 @@
284
342
  };
285
343
  58B511F11A9E6C8500147676 /* Release */ = {
286
344
  isa = XCBuildConfiguration;
345
+ baseConfigurationReference = 949D2E1F5D8BA4C00733B1FD /* Pods-AttentiveReactNativeSdk.release.xcconfig */;
287
346
  buildSettings = {
288
347
  ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
289
348
  CLANG_ENABLE_MODULES = YES;
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>AttentiveReactNativeSdk.xcscheme_^#shared#^_</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ </dict>
14
+ </plist>
@@ -124,9 +124,20 @@ struct DebugEvent {
124
124
  }
125
125
  }
126
126
 
127
+ /// Called from the native bridge when destroyCreative is invoked; shows debug overlay when debug mode is on.
128
+ @objc
129
+ public func notifyCreativeDestroyed() {
130
+ if debuggingEnabled {
131
+ showDebugInfo(event: "Creative Destroyed", data: ["action": "destroyCreative"])
132
+ }
133
+ }
134
+
127
135
  @objc(updateDomain:)
128
136
  public func updateDomain(domain: String) {
129
137
  sdk.update(domain:domain)
138
+ if debuggingEnabled {
139
+ showDebugInfo(event: "Domain Updated", data: ["domain": domain])
140
+ }
130
141
  }
131
142
 
132
143
  @objc(identify:)
@@ -136,6 +147,10 @@ struct DebugEvent {
136
147
 
137
148
  sdk.identify(identifiers)
138
149
 
150
+ if debuggingEnabled {
151
+ showDebugInfo(event: "User Identified", data: ["identifiers": identifiers])
152
+ }
153
+
139
154
  print("✅ [AttentiveSDK] identify completed")
140
155
  print(" User is now identified with the SDK")
141
156
  print(" SDK can now make network calls")
@@ -144,6 +159,9 @@ struct DebugEvent {
144
159
  @objc
145
160
  public func clearUser() {
146
161
  sdk.clearUser()
162
+ if debuggingEnabled {
163
+ showDebugInfo(event: "User Cleared", data: ["action": "clearUser"])
164
+ }
147
165
  }
148
166
 
149
167
  // MARK: - Push Notification Methods
@@ -580,9 +598,7 @@ public extension ATTNNativeSDK {
580
598
  if let category = firstItem.category {
581
599
  itemDetails["category"] = category
582
600
  }
583
- if let quantity = firstItem.quantity {
584
- itemDetails["quantity"] = quantity
585
- }
601
+ itemDetails["quantity"] = firstItem.quantity
586
602
  debugData["first_item"] = itemDetails
587
603
  }
588
604
 
@@ -620,9 +636,7 @@ public extension ATTNNativeSDK {
620
636
  if let category = firstItem.category {
621
637
  itemDetails["category"] = category
622
638
  }
623
- if let quantity = firstItem.quantity {
624
- itemDetails["quantity"] = quantity
625
- }
639
+ itemDetails["quantity"] = firstItem.quantity
626
640
  debugData["first_item"] = itemDetails
627
641
  }
628
642
 
@@ -632,13 +646,19 @@ public extension ATTNNativeSDK {
632
646
 
633
647
  @objc
634
648
  func recordPurchaseEvent(_ attributes: [String: Any]) {
635
- let attrOrder = attributes["order"] as? [String: String] ?? [:]
636
- guard let orderId = attrOrder["id"] else { return }
649
+ // React Native bridge sends top-level "orderId"; legacy format used "order"["id"]
650
+ let orderId = (attributes["orderId"] as? String)
651
+ ?? (attributes["order"] as? [String: String])?["id"]
652
+ guard let orderId = orderId else { return }
637
653
  let order = ATTNOrder(orderId: orderId)
638
654
  let items = parseItems(attributes["items"] as? [[String : Any]] ?? [])
639
655
  let event = ATTNPurchaseEvent(items: items, order: order)
656
+
657
+ #if DEBUG
658
+ print("[Attentive]", event.debugDescription)
659
+ #endif
640
660
  ATTNEventTracker.sharedInstance()?.record(event: event)
641
-
661
+
642
662
  if debuggingEnabled {
643
663
  // Enhanced debug data to show parsed item details
644
664
  var debugData: [String: Any] = [
@@ -662,9 +682,7 @@ public extension ATTNNativeSDK {
662
682
  if let category = firstItem.category {
663
683
  itemDetails["category"] = category
664
684
  }
665
- if let quantity = firstItem.quantity {
666
- itemDetails["quantity"] = quantity
667
- }
685
+ itemDetails["quantity"] = firstItem.quantity
668
686
  debugData["first_item"] = itemDetails
669
687
  }
670
688
 
@@ -714,7 +732,7 @@ private extension ATTNNativeSDK {
714
732
 
715
733
  // React Native bridges JS numbers as NSNumber, so accept NSNumber directly
716
734
  if let quantity = rawItem["quantity"] as? NSNumber {
717
- item.quantity = quantity
735
+ item.quantity = quantity.intValue
718
736
  }
719
737
 
720
738
  if let category = rawItem["category"] as? String {
@@ -733,18 +751,35 @@ private extension ATTNNativeSDK {
733
751
  debugHistory.append(debugEvent)
734
752
 
735
753
  DispatchQueue.main.async {
736
- // Create debug overlay with history
737
754
  guard let keyWindow = UIApplication.shared.connectedScenes
738
755
  .compactMap({ $0 as? UIWindowScene })
739
756
  .first?.windows
740
- .first(where: { $0.isKeyWindow }) else { return }
757
+ .first(where: { $0.isKeyWindow }),
758
+ let rootVC = keyWindow.rootViewController else { return }
759
+
760
+ // Present from the topmost view controller so the debug window always appears on top
761
+ let topmost = self.topmostViewController(from: rootVC)
741
762
 
742
763
  let debugVC = DebugOverlayViewController(currentEvent: event, currentData: data, history: self.debugHistory)
743
764
  debugVC.modalPresentationStyle = .overFullScreen
744
765
  debugVC.modalTransitionStyle = .crossDissolve
745
766
 
746
- keyWindow.rootViewController?.present(debugVC, animated: true)
767
+ topmost.present(debugVC, animated: true)
768
+ }
769
+ }
770
+
771
+ /// Returns the topmost view controller so the debug overlay is presented on top of any existing modals.
772
+ func topmostViewController(from base: UIViewController) -> UIViewController {
773
+ if let presented = base.presentedViewController {
774
+ return topmostViewController(from: presented)
775
+ }
776
+ if let nav = base as? UINavigationController, let visible = nav.visibleViewController {
777
+ return topmostViewController(from: visible)
778
+ }
779
+ if let tab = base as? UITabBarController, let selected = tab.selectedViewController {
780
+ return topmostViewController(from: selected)
747
781
  }
782
+ return base
748
783
  }
749
784
  }
750
785
 
package/ios/Podfile CHANGED
@@ -36,10 +36,10 @@ target 'AttentiveReactNativeSdk' do
36
36
  post_install do |installer|
37
37
  react_native_post_install(
38
38
  installer,
39
+ config[:reactNativePath],
39
40
  # Set `mac_catalyst_enabled` to `true` in order to apply patches
40
41
  # necessary for Mac Catalyst builds
41
42
  :mac_catalyst_enabled => false
42
43
  )
43
- __apply_Xcode_12_5_M1_post_install_workaround(installer)
44
44
  end
45
45
  end
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSPrivacyAccessedAPITypes</key>
6
+ <array>
7
+ <dict>
8
+ <key>NSPrivacyAccessedAPIType</key>
9
+ <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
10
+ <key>NSPrivacyAccessedAPITypeReasons</key>
11
+ <array>
12
+ <string>C617.1</string>
13
+ </array>
14
+ </dict>
15
+ <dict>
16
+ <key>NSPrivacyAccessedAPIType</key>
17
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
18
+ <key>NSPrivacyAccessedAPITypeReasons</key>
19
+ <array>
20
+ <string>CA92.1</string>
21
+ </array>
22
+ </dict>
23
+ <dict>
24
+ <key>NSPrivacyAccessedAPIType</key>
25
+ <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
26
+ <key>NSPrivacyAccessedAPITypeReasons</key>
27
+ <array>
28
+ <string>35F9.1</string>
29
+ </array>
30
+ </dict>
31
+ </array>
32
+ <key>NSPrivacyCollectedDataTypes</key>
33
+ <array/>
34
+ <key>NSPrivacyTracking</key>
35
+ <false/>
36
+ </dict>
37
+ </plist>
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","isTurboModuleEnabled","global","__turboModuleProxy","AttentiveReactNativeSdkModule","TurboModuleRegistry","get","NativeModules","AttentiveReactNativeSdk","_default","exports","default"],"sourceRoot":"../../src","sources":["NativeAttentiveReactNativeSdk.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AA8IA;AACA;AACA,MAAMC,oBAAoB,GAAIC,MAAM,CAASC,kBAAkB,IAAI,IAAI;AAEvE,MAAMC,6BAA6B,GAAGH,oBAAoB,GACtDI,gCAAmB,CAACC,GAAG,CAAO,yBAAyB,CAAC,GACxDC,0BAAa,CAACC,uBAAuB;AAAC,IAAAC,QAAA,GAE3BL,6BAA6B;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","isTurboModuleEnabled","global","__turboModuleProxy","AttentiveReactNativeSdkModule","TurboModuleRegistry","get","NativeModules","AttentiveReactNativeSdk","_default","exports","default"],"sourceRoot":"../../src","sources":["NativeAttentiveReactNativeSdk.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AA8IA;AACA;AACA,MAAMC,oBAAoB,GAAIC,MAAM,CAASC,kBAAkB,IAAI,IAAI;AAEvE,MAAMC,6BAA6B,GAAGH,oBAAoB,GACtDI,gCAAmB,CAACC,GAAG,CAAO,yBAAyB,CAAC,GACxDC,0BAAa,CAACC,uBAAuB;AAAC,IAAAC,QAAA,GAE3BL,6BAA6B;AAAAM,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["eventTypes.tsx"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["eventTypes.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_NativeAttentiveReactNativeSdk","_interopRequireDefault","obj","__esModule","default","LINKING_ERROR","Platform","select","ios","AttentiveReactNativeSdk","NativeAttentiveReactNativeSdkModule","Proxy","get","Error","initialize","configuration","attentiveDomain","mode","skipFatigueOnCreatives","enableDebugger","triggerCreative","creativeId","destroyCreative","updateDomain","domain","identify","identifiers","phone","email","klaviyoId","shopifyId","clientUserId","customIdentifiers","clearUser","recordAddToCartEvent","attrs","items","deeplink","recordProductViewEvent","recordPurchaseEvent","orderId","cartId","cartCoupon","recordCustomEvent","type","properties","invokeAttentiveDebugHelper","exportDebugLogs","registerForPushNotifications","registerDeviceToken","token","authorizationStatus","registerDeviceTokenWithCallback","callback","handleRegularOpen","console","log","handlePushOpened","userInfo","applicationState","handleForegroundNotification","handleForegroundPush","handlePushOpen"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAcA,IAAAC,8BAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEwC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAExC,MAAMG,aAAa,GACjB,qFAAqF,GACrFC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,gCAAgC;EACrCJ,OAAO,EAAE;AACX,CAAC,CAAC,GACF,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMK,uBAAuB,GAC3BC,sCAAmC,GAC/BA,sCAAmC,GACnC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CACF,CACG;;AAET;AACA;AACA;AACA;AACA,SAASS,UAAUA,CAACC,aAAwC,EAAE;EAC5DN,uBAAuB,CAACK,UAAU,CAChCC,aAAa,CAACC,eAAe,EAC7BD,aAAa,CAACE,IAAI,EAClBF,aAAa,CAACG,sBAAsB,IAAI,KAAK,EAC7CH,aAAa,CAACI,cAAc,IAAI,KAClC,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAACC,UAAmB,EAAE;EAC5CZ,uBAAuB,CAACW,eAAe,CAACC,UAAU,CAAC;AACrD;;AAEA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAG;EACzBb,uBAAuB,CAACa,eAAe,CAAC,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,MAAc,EAAE;EACpCf,uBAAuB,CAACc,YAAY,CAACC,MAAM,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAACC,WAA4B,EAAE;EAC9CjB,uBAAuB,CAACgB,QAAQ,CAC9BC,WAAW,CAACC,KAAK,EACjBD,WAAW,CAACE,KAAK,EACjBF,WAAW,CAACG,SAAS,EACrBH,WAAW,CAACI,SAAS,EACrBJ,WAAW,CAACK,YAAY,EACxBL,WAAW,CAACM,iBACd,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAASC,SAASA,CAAA,EAAG;EACnBxB,uBAAuB,CAACwB,SAAS,CAAC,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAACC,KAAgB,EAAE;EAC9C1B,uBAAuB,CAACyB,oBAAoB,CAACC,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA,SAASC,sBAAsBA,CAACH,KAAkB,EAAE;EAClD1B,uBAAuB,CAAC6B,sBAAsB,CAACH,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC7E;;AAEA;AACA;AACA;AACA;AACA,SAASE,mBAAmBA,CAACJ,KAAe,EAAE;EAC5C1B,uBAAuB,CAAC8B,mBAAmB,CACzCJ,KAAK,CAACC,KAAK,EACXD,KAAK,CAACK,OAAO,EACbL,KAAK,CAACM,MAAM,EACZN,KAAK,CAACO,UACR,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACR,KAAkB,EAAE;EAC7C1B,uBAAuB,CAACkC,iBAAiB,CAACR,KAAK,CAACS,IAAI,EAAET,KAAK,CAACU,UAAU,CAAC;AACzE;;AAEA;AACA;AACA;AACA,SAASC,0BAA0BA,CAAA,EAAG;EACpCrC,uBAAuB,CAACqC,0BAA0B,CAAC,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAoB;EAC1C,OAAOtC,uBAAuB,CAACsC,eAAe,CAAC,CAAC;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,4BAA4BA,CAAA,EAAS;EAC5CvC,uBAAuB,CAACuC,4BAA4B,CAAC,CAAC;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mBAAmBA,CAC1BC,KAAa,EACbC,mBAA4C,EACtC;EACN1C,uBAAuB,CAACwC,mBAAmB,CAACC,KAAK,EAAEC,mBAAmB,CAAC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,+BAA+BA,CACtCF,KAAa,EACbC,mBAA4C,EAC5CE,QAKS,EACH;EACN5C,uBAAuB,CAAC2C,+BAA+B,CACrDF,KAAK,EACLC,mBAAmB,EACnBE,QACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACH,mBAA4C,EAAQ;EAC7EI,OAAO,CAACC,GAAG,CAAC,6DAA6D,CAAC;EAC1ED,OAAO,CAACC,GAAG,CAAC,4BAA4BL,mBAAmB,EAAE,CAAC;EAC9DI,OAAO,CAACC,GAAG,CACT,mEACF,CAAC;EAED/C,uBAAuB,CAAC6C,iBAAiB,CAACH,mBAAmB,CAAC;EAE9DI,OAAO,CAACC,GAAG,CAAC,mDAAmD,CAAC;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACvBC,QAAkC,EAClCC,gBAAkC,EAClCR,mBAA4C,EACtC;EACN1C,uBAAuB,CAACgD,gBAAgB,CACtCC,QAAQ,EACRC,gBAAgB,EAChBR,mBACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASS,4BAA4BA,CACnCF,QAAkC,EAC5B;EACNjD,uBAAuB,CAACmD,4BAA4B,CAACF,QAAkB,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,oBAAoBA,CAC3BH,QAAkC,EAClCP,mBAA4C,EACtC;EACN1C,uBAAuB,CAACoD,oBAAoB,CAC1CH,QAAQ,EACRP,mBACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASW,cAAcA,CACrBJ,QAAkC,EAClCP,mBAA4C,EACtC;EACN1C,uBAAuB,CAACqD,cAAc,CACpCJ,QAAQ,EACRP,mBACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_NativeAttentiveReactNativeSdk","_interopRequireDefault","obj","__esModule","default","LINKING_ERROR","Platform","select","ios","AttentiveReactNativeSdk","NativeAttentiveReactNativeSdkModule","Proxy","get","Error","initialize","configuration","attentiveDomain","mode","skipFatigueOnCreatives","enableDebugger","triggerCreative","creativeId","destroyCreative","updateDomain","domain","identify","identifiers","phone","email","klaviyoId","shopifyId","clientUserId","customIdentifiers","clearUser","recordAddToCartEvent","attrs","items","deeplink","recordProductViewEvent","recordPurchaseEvent","orderId","cartId","cartCoupon","recordCustomEvent","type","properties","invokeAttentiveDebugHelper","exportDebugLogs","registerForPushNotifications","registerDeviceToken","token","authorizationStatus","registerDeviceTokenWithCallback","callback","handleRegularOpen","console","log","handlePushOpened","userInfo","applicationState","handleForegroundNotification","handleForegroundPush","handlePushOpen"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAcA,IAAAC,8BAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEwC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAExC,MAAMG,aAAa,GAChB,qFAAoF,GACrFC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,gCAAgC;EACrCJ,OAAO,EAAE;AACX,CAAC,CAAC,GACF,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMK,uBAAuB,GAC3BC,sCAAmC,GAC/BA,sCAAmC,GACnC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CAAC,CAEA;;AAET;AACA;AACA;AACA;AACA,SAASS,UAAUA,CAACC,aAAwC,EAAE;EAC5DN,uBAAuB,CAACK,UAAU,CAChCC,aAAa,CAACC,eAAe,EAC7BD,aAAa,CAACE,IAAI,EAClBF,aAAa,CAACG,sBAAsB,IAAI,KAAK,EAC7CH,aAAa,CAACI,cAAc,IAAI,KAAK,CACtC;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAACC,UAAmB,EAAE;EAC5CZ,uBAAuB,CAACW,eAAe,CAACC,UAAU,CAAC;AACrD;;AAEA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAG;EACzBb,uBAAuB,CAACa,eAAe,EAAE;AAC3C;;AAEA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,MAAc,EAAE;EACpCf,uBAAuB,CAACc,YAAY,CAACC,MAAM,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAACC,WAA4B,EAAE;EAC9CjB,uBAAuB,CAACgB,QAAQ,CAC9BC,WAAW,CAACC,KAAK,EACjBD,WAAW,CAACE,KAAK,EACjBF,WAAW,CAACG,SAAS,EACrBH,WAAW,CAACI,SAAS,EACrBJ,WAAW,CAACK,YAAY,EACxBL,WAAW,CAACM,iBAAiB,CAC9B;AACH;;AAEA;AACA;AACA;AACA,SAASC,SAASA,CAAA,EAAG;EACnBxB,uBAAuB,CAACwB,SAAS,EAAE;AACrC;;AAEA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAACC,KAAgB,EAAE;EAC9C1B,uBAAuB,CAACyB,oBAAoB,CAACC,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA,SAASC,sBAAsBA,CAACH,KAAkB,EAAE;EAClD1B,uBAAuB,CAAC6B,sBAAsB,CAACH,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC7E;;AAEA;AACA;AACA;AACA;AACA,SAASE,mBAAmBA,CAACJ,KAAe,EAAE;EAC5C1B,uBAAuB,CAAC8B,mBAAmB,CACzCJ,KAAK,CAACC,KAAK,EACXD,KAAK,CAACK,OAAO,EACbL,KAAK,CAACM,MAAM,EACZN,KAAK,CAACO,UAAU,CACjB;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACR,KAAkB,EAAE;EAC7C1B,uBAAuB,CAACkC,iBAAiB,CAACR,KAAK,CAACS,IAAI,EAAET,KAAK,CAACU,UAAU,CAAC;AACzE;;AAEA;AACA;AACA;AACA,SAASC,0BAA0BA,CAAA,EAAG;EACpCrC,uBAAuB,CAACqC,0BAA0B,EAAE;AACtD;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAoB;EAC1C,OAAOtC,uBAAuB,CAACsC,eAAe,EAAE;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,4BAA4BA,CAAA,EAAS;EAC5CvC,uBAAuB,CAACuC,4BAA4B,EAAE;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mBAAmBA,CAC1BC,KAAa,EACbC,mBAA4C,EACtC;EACN1C,uBAAuB,CAACwC,mBAAmB,CAACC,KAAK,EAAEC,mBAAmB,CAAC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,+BAA+BA,CACtCF,KAAa,EACbC,mBAA4C,EAC5CE,QAKS,EACH;EACN5C,uBAAuB,CAAC2C,+BAA+B,CACrDF,KAAK,EACLC,mBAAmB,EACnBE,QAAQ,CACT;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACH,mBAA4C,EAAQ;EAC7EI,OAAO,CAACC,GAAG,CAAC,6DAA6D,CAAC;EAC1ED,OAAO,CAACC,GAAG,CAAE,4BAA2BL,mBAAoB,EAAC,CAAC;EAC9DI,OAAO,CAACC,GAAG,CACT,mEAAmE,CACpE;EAED/C,uBAAuB,CAAC6C,iBAAiB,CAACH,mBAAmB,CAAC;EAE9DI,OAAO,CAACC,GAAG,CAAC,mDAAmD,CAAC;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACvBC,QAAkC,EAClCC,gBAAkC,EAClCR,mBAA4C,EACtC;EACN1C,uBAAuB,CAACgD,gBAAgB,CACtCC,QAAQ,EACRC,gBAAgB,EAChBR,mBAAmB,CACpB;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASS,4BAA4BA,CACnCF,QAAkC,EAC5B;EACNjD,uBAAuB,CAACmD,4BAA4B,CAACF,QAAQ,CAAW;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,oBAAoBA,CAC3BH,QAAkC,EAClCP,mBAA4C,EACtC;EACN1C,uBAAuB,CAACoD,oBAAoB,CAC1CH,QAAQ,EACRP,mBAAmB,CACpB;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASW,cAAcA,CACrBJ,QAAkC,EAClCP,mBAA4C,EACtC;EACN1C,uBAAuB,CAACqD,cAAc,CACpCJ,QAAQ,EACRP,mBAAmB,CACpB;AACH"}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","NativeModules","isTurboModuleEnabled","global","__turboModuleProxy","AttentiveReactNativeSdkModule","get","AttentiveReactNativeSdk"],"sourceRoot":"../../src","sources":["NativeAttentiveReactNativeSdk.ts"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,aAAa,QAAQ,cAAc;AA8IjE;AACA;AACA,MAAMC,oBAAoB,GAAIC,MAAM,CAASC,kBAAkB,IAAI,IAAI;AAEvE,MAAMC,6BAA6B,GAAGH,oBAAoB,GACtDF,mBAAmB,CAACM,GAAG,CAAO,yBAAyB,CAAC,GACxDL,aAAa,CAACM,uBAAuB;AAEzC,eAAeF,6BAA6B","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","NativeModules","isTurboModuleEnabled","global","__turboModuleProxy","AttentiveReactNativeSdkModule","get","AttentiveReactNativeSdk"],"sourceRoot":"../../src","sources":["NativeAttentiveReactNativeSdk.ts"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,aAAa,QAAQ,cAAc;AA8IjE;AACA;AACA,MAAMC,oBAAoB,GAAIC,MAAM,CAASC,kBAAkB,IAAI,IAAI;AAEvE,MAAMC,6BAA6B,GAAGH,oBAAoB,GACtDF,mBAAmB,CAACM,GAAG,CAAO,yBAAyB,CAAC,GACxDL,aAAa,CAACM,uBAAuB;AAEzC,eAAeF,6BAA6B"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["eventTypes.tsx"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["eventTypes.tsx"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","NativeAttentiveReactNativeSdkModule","LINKING_ERROR","select","ios","default","AttentiveReactNativeSdk","Proxy","get","Error","initialize","configuration","attentiveDomain","mode","skipFatigueOnCreatives","enableDebugger","triggerCreative","creativeId","destroyCreative","updateDomain","domain","identify","identifiers","phone","email","klaviyoId","shopifyId","clientUserId","customIdentifiers","clearUser","recordAddToCartEvent","attrs","items","deeplink","recordProductViewEvent","recordPurchaseEvent","orderId","cartId","cartCoupon","recordCustomEvent","type","properties","invokeAttentiveDebugHelper","exportDebugLogs","registerForPushNotifications","registerDeviceToken","token","authorizationStatus","registerDeviceTokenWithCallback","callback","handleRegularOpen","console","log","handlePushOpened","userInfo","applicationState","handleForegroundNotification","handleForegroundPush","handlePushOpen"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAcvC,OAAOC,mCAAmC,MAEnC,iCAAiC;AAExC,MAAMC,aAAa,GACjB,qFAAqF,GACrFF,QAAQ,CAACG,MAAM,CAAC;EACdC,GAAG,EAAE,gCAAgC;EACrCC,OAAO,EAAE;AACX,CAAC,CAAC,GACF,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,uBAAuB,GAC3BL,mCAAmC,GAC/BA,mCAAmC,GACnC,IAAIM,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CACG;;AAET;AACA;AACA;AACA;AACA,SAASQ,UAAUA,CAACC,aAAwC,EAAE;EAC5DL,uBAAuB,CAACI,UAAU,CAChCC,aAAa,CAACC,eAAe,EAC7BD,aAAa,CAACE,IAAI,EAClBF,aAAa,CAACG,sBAAsB,IAAI,KAAK,EAC7CH,aAAa,CAACI,cAAc,IAAI,KAClC,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAACC,UAAmB,EAAE;EAC5CX,uBAAuB,CAACU,eAAe,CAACC,UAAU,CAAC;AACrD;;AAEA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAG;EACzBZ,uBAAuB,CAACY,eAAe,CAAC,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,MAAc,EAAE;EACpCd,uBAAuB,CAACa,YAAY,CAACC,MAAM,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAACC,WAA4B,EAAE;EAC9ChB,uBAAuB,CAACe,QAAQ,CAC9BC,WAAW,CAACC,KAAK,EACjBD,WAAW,CAACE,KAAK,EACjBF,WAAW,CAACG,SAAS,EACrBH,WAAW,CAACI,SAAS,EACrBJ,WAAW,CAACK,YAAY,EACxBL,WAAW,CAACM,iBACd,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAASC,SAASA,CAAA,EAAG;EACnBvB,uBAAuB,CAACuB,SAAS,CAAC,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAACC,KAAgB,EAAE;EAC9CzB,uBAAuB,CAACwB,oBAAoB,CAACC,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA,SAASC,sBAAsBA,CAACH,KAAkB,EAAE;EAClDzB,uBAAuB,CAAC4B,sBAAsB,CAACH,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC7E;;AAEA;AACA;AACA;AACA;AACA,SAASE,mBAAmBA,CAACJ,KAAe,EAAE;EAC5CzB,uBAAuB,CAAC6B,mBAAmB,CACzCJ,KAAK,CAACC,KAAK,EACXD,KAAK,CAACK,OAAO,EACbL,KAAK,CAACM,MAAM,EACZN,KAAK,CAACO,UACR,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACR,KAAkB,EAAE;EAC7CzB,uBAAuB,CAACiC,iBAAiB,CAACR,KAAK,CAACS,IAAI,EAAET,KAAK,CAACU,UAAU,CAAC;AACzE;;AAEA;AACA;AACA;AACA,SAASC,0BAA0BA,CAAA,EAAG;EACpCpC,uBAAuB,CAACoC,0BAA0B,CAAC,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAoB;EAC1C,OAAOrC,uBAAuB,CAACqC,eAAe,CAAC,CAAC;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,4BAA4BA,CAAA,EAAS;EAC5CtC,uBAAuB,CAACsC,4BAA4B,CAAC,CAAC;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mBAAmBA,CAC1BC,KAAa,EACbC,mBAA4C,EACtC;EACNzC,uBAAuB,CAACuC,mBAAmB,CAACC,KAAK,EAAEC,mBAAmB,CAAC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,+BAA+BA,CACtCF,KAAa,EACbC,mBAA4C,EAC5CE,QAKS,EACH;EACN3C,uBAAuB,CAAC0C,+BAA+B,CACrDF,KAAK,EACLC,mBAAmB,EACnBE,QACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACH,mBAA4C,EAAQ;EAC7EI,OAAO,CAACC,GAAG,CAAC,6DAA6D,CAAC;EAC1ED,OAAO,CAACC,GAAG,CAAC,4BAA4BL,mBAAmB,EAAE,CAAC;EAC9DI,OAAO,CAACC,GAAG,CACT,mEACF,CAAC;EAED9C,uBAAuB,CAAC4C,iBAAiB,CAACH,mBAAmB,CAAC;EAE9DI,OAAO,CAACC,GAAG,CAAC,mDAAmD,CAAC;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACvBC,QAAkC,EAClCC,gBAAkC,EAClCR,mBAA4C,EACtC;EACNzC,uBAAuB,CAAC+C,gBAAgB,CACtCC,QAAQ,EACRC,gBAAgB,EAChBR,mBACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASS,4BAA4BA,CACnCF,QAAkC,EAC5B;EACNhD,uBAAuB,CAACkD,4BAA4B,CAACF,QAAkB,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,oBAAoBA,CAC3BH,QAAkC,EAClCP,mBAA4C,EACtC;EACNzC,uBAAuB,CAACmD,oBAAoB,CAC1CH,QAAQ,EACRP,mBACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASW,cAAcA,CACrBJ,QAAkC,EAClCP,mBAA4C,EACtC;EACNzC,uBAAuB,CAACoD,cAAc,CACpCJ,QAAQ,EACRP,mBACF,CAAC;AACH;AAEA,SACErC,UAAU,EACVM,eAAe,EACfE,eAAe,EACfC,YAAY,EACZE,QAAQ,EACRQ,SAAS,EACTC,oBAAoB,EACpBI,sBAAsB,EACtBC,mBAAmB,EACnBI,iBAAiB,EACjBG,0BAA0B,EAC1BC,eAAe;AACf;AACAC,4BAA4B,EAC5BC,mBAAmB,EACnBG,+BAA+B,EAC/BE,iBAAiB,EACjBG,gBAAgB,EAChBG,4BAA4B,EAC5BC,oBAAoB,EACpBC,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["Platform","NativeAttentiveReactNativeSdkModule","LINKING_ERROR","select","ios","default","AttentiveReactNativeSdk","Proxy","get","Error","initialize","configuration","attentiveDomain","mode","skipFatigueOnCreatives","enableDebugger","triggerCreative","creativeId","destroyCreative","updateDomain","domain","identify","identifiers","phone","email","klaviyoId","shopifyId","clientUserId","customIdentifiers","clearUser","recordAddToCartEvent","attrs","items","deeplink","recordProductViewEvent","recordPurchaseEvent","orderId","cartId","cartCoupon","recordCustomEvent","type","properties","invokeAttentiveDebugHelper","exportDebugLogs","registerForPushNotifications","registerDeviceToken","token","authorizationStatus","registerDeviceTokenWithCallback","callback","handleRegularOpen","console","log","handlePushOpened","userInfo","applicationState","handleForegroundNotification","handleForegroundPush","handlePushOpen"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAcvC,OAAOC,mCAAmC,MAEnC,iCAAiC;AAExC,MAAMC,aAAa,GAChB,qFAAoF,GACrFF,QAAQ,CAACG,MAAM,CAAC;EACdC,GAAG,EAAE,gCAAgC;EACrCC,OAAO,EAAE;AACX,CAAC,CAAC,GACF,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,uBAAuB,GAC3BL,mCAAmC,GAC/BA,mCAAmC,GACnC,IAAIM,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CAAC,CAEA;;AAET;AACA;AACA;AACA;AACA,SAASQ,UAAUA,CAACC,aAAwC,EAAE;EAC5DL,uBAAuB,CAACI,UAAU,CAChCC,aAAa,CAACC,eAAe,EAC7BD,aAAa,CAACE,IAAI,EAClBF,aAAa,CAACG,sBAAsB,IAAI,KAAK,EAC7CH,aAAa,CAACI,cAAc,IAAI,KAAK,CACtC;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAACC,UAAmB,EAAE;EAC5CX,uBAAuB,CAACU,eAAe,CAACC,UAAU,CAAC;AACrD;;AAEA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAG;EACzBZ,uBAAuB,CAACY,eAAe,EAAE;AAC3C;;AAEA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,MAAc,EAAE;EACpCd,uBAAuB,CAACa,YAAY,CAACC,MAAM,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAACC,WAA4B,EAAE;EAC9ChB,uBAAuB,CAACe,QAAQ,CAC9BC,WAAW,CAACC,KAAK,EACjBD,WAAW,CAACE,KAAK,EACjBF,WAAW,CAACG,SAAS,EACrBH,WAAW,CAACI,SAAS,EACrBJ,WAAW,CAACK,YAAY,EACxBL,WAAW,CAACM,iBAAiB,CAC9B;AACH;;AAEA;AACA;AACA;AACA,SAASC,SAASA,CAAA,EAAG;EACnBvB,uBAAuB,CAACuB,SAAS,EAAE;AACrC;;AAEA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAACC,KAAgB,EAAE;EAC9CzB,uBAAuB,CAACwB,oBAAoB,CAACC,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA,SAASC,sBAAsBA,CAACH,KAAkB,EAAE;EAClDzB,uBAAuB,CAAC4B,sBAAsB,CAACH,KAAK,CAACC,KAAK,EAAED,KAAK,CAACE,QAAQ,CAAC;AAC7E;;AAEA;AACA;AACA;AACA;AACA,SAASE,mBAAmBA,CAACJ,KAAe,EAAE;EAC5CzB,uBAAuB,CAAC6B,mBAAmB,CACzCJ,KAAK,CAACC,KAAK,EACXD,KAAK,CAACK,OAAO,EACbL,KAAK,CAACM,MAAM,EACZN,KAAK,CAACO,UAAU,CACjB;AACH;;AAEA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACR,KAAkB,EAAE;EAC7CzB,uBAAuB,CAACiC,iBAAiB,CAACR,KAAK,CAACS,IAAI,EAAET,KAAK,CAACU,UAAU,CAAC;AACzE;;AAEA;AACA;AACA;AACA,SAASC,0BAA0BA,CAAA,EAAG;EACpCpC,uBAAuB,CAACoC,0BAA0B,EAAE;AACtD;;AAEA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAAA,EAAoB;EAC1C,OAAOrC,uBAAuB,CAACqC,eAAe,EAAE;AAClD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,4BAA4BA,CAAA,EAAS;EAC5CtC,uBAAuB,CAACsC,4BAA4B,EAAE;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mBAAmBA,CAC1BC,KAAa,EACbC,mBAA4C,EACtC;EACNzC,uBAAuB,CAACuC,mBAAmB,CAACC,KAAK,EAAEC,mBAAmB,CAAC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,+BAA+BA,CACtCF,KAAa,EACbC,mBAA4C,EAC5CE,QAKS,EACH;EACN3C,uBAAuB,CAAC0C,+BAA+B,CACrDF,KAAK,EACLC,mBAAmB,EACnBE,QAAQ,CACT;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACH,mBAA4C,EAAQ;EAC7EI,OAAO,CAACC,GAAG,CAAC,6DAA6D,CAAC;EAC1ED,OAAO,CAACC,GAAG,CAAE,4BAA2BL,mBAAoB,EAAC,CAAC;EAC9DI,OAAO,CAACC,GAAG,CACT,mEAAmE,CACpE;EAED9C,uBAAuB,CAAC4C,iBAAiB,CAACH,mBAAmB,CAAC;EAE9DI,OAAO,CAACC,GAAG,CAAC,mDAAmD,CAAC;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACvBC,QAAkC,EAClCC,gBAAkC,EAClCR,mBAA4C,EACtC;EACNzC,uBAAuB,CAAC+C,gBAAgB,CACtCC,QAAQ,EACRC,gBAAgB,EAChBR,mBAAmB,CACpB;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASS,4BAA4BA,CACnCF,QAAkC,EAC5B;EACNhD,uBAAuB,CAACkD,4BAA4B,CAACF,QAAQ,CAAW;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,oBAAoBA,CAC3BH,QAAkC,EAClCP,mBAA4C,EACtC;EACNzC,uBAAuB,CAACmD,oBAAoB,CAC1CH,QAAQ,EACRP,mBAAmB,CACpB;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASW,cAAcA,CACrBJ,QAAkC,EAClCP,mBAA4C,EACtC;EACNzC,uBAAuB,CAACoD,cAAc,CACpCJ,QAAQ,EACRP,mBAAmB,CACpB;AACH;AAEA,SACErC,UAAU,EACVM,eAAe,EACfE,eAAe,EACfC,YAAY,EACZE,QAAQ,EACRQ,SAAS,EACTC,oBAAoB,EACpBI,sBAAsB,EACtBC,mBAAmB,EACnBI,iBAAiB,EACjBG,0BAA0B,EAC1BC,eAAe;AACf;AACAC,4BAA4B,EAC5BC,mBAAmB,EACnBG,+BAA+B,EAC/BE,iBAAiB,EACjBG,gBAAgB,EAChBG,4BAA4B,EAC5BC,oBAAoB,EACpBC,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attentive-mobile/attentive-react-native-sdk",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "React Native Module for the Attentive SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",