react-native-acoustic-connect-beta 19.0.18 → 19.0.19

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 19.0.19 (2026-09-08)
2
+
3
+ ### Reverts
4
+
5
+ * Revert "Beta ReactNativeConnect build: 18.0.36" ([609ad7d](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/commit/609ad7d3244ec06f27dced5864d40585c5b3c9cf))
1
6
  ## 19.0.18 (2026-09-07)
2
7
 
3
8
  ### Reverts
package/README.md CHANGED
@@ -560,6 +560,41 @@ layout config:
560
560
  > clicks, and custom events still flow. It only drops the image data, which is
561
561
  > what a subscription without session replay has no consumer for.
562
562
 
563
+ #### `NumberOfWebViews` turns off iOS layout capture — leave it at `0`
564
+
565
+ `AutoLayout` rules accept a `NumberOfWebViews` key. On iOS, any value greater
566
+ than zero marks the screens that rule covers as web-view screens, and the SDK's
567
+ automatic layout capture is skipped for a web-view screen. Its effect is not
568
+ limited to screens that actually host a `WebView`: the value is read as a
569
+ declaration about the rule, not a count that gets verified.
570
+
571
+ The trap is where it is usually set. `GlobalScreenSettings` is the rule that
572
+ applies to **every** screen with no more specific rule of its own, and React
573
+ Native screens are all in that position — they are hosted by the same generic
574
+ container class, so no per-screen native rule matches them. So a single
575
+ `"NumberOfWebViews": 1` under `GlobalScreenSettings` switches off
576
+ auto-instrumented layout capture for the entire app on iOS, including screens
577
+ with no web content at all:
578
+
579
+ ```json
580
+ {
581
+ "Connect": {
582
+ "layoutConfigIos": {
583
+ "AutoLayout": {
584
+ "GlobalScreenSettings": { "NumberOfWebViews": 0 }
585
+ }
586
+ }
587
+ }
588
+ }
589
+ ```
590
+
591
+ Screen views, clicks, and custom events are unaffected — the symptom is layout
592
+ messages going missing while everything else keeps arriving, which reads like a
593
+ capture failure rather than a setting. Keep `NumberOfWebViews` at `0`, the value
594
+ every shipped template uses. To stand layout capture down deliberately, set
595
+ `CaptureLayoutOn: 0` on the rule instead — it is the key that means that, and it
596
+ leaves `NumberOfWebViews` free to describe the screen.
597
+
563
598
  #### Capture timing (`CaptureLayoutDelay`)
564
599
 
565
600
  `AutoLayout.GlobalScreenSettings.CaptureLayoutDelay` is how long, in
@@ -1,4 +1,4 @@
1
- #Mon Sep 07 11:29:39 GMT 2026
1
+ #Tue Sep 08 11:25:15 GMT 2026
2
2
  UseWhiteList=true
3
3
  PrintScreen=3
4
4
  UseRandomSample=false
@@ -969,16 +969,61 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
969
969
  // crash on an ordinary screen change.
970
970
  val activity = getCurrentActivity()
971
971
  if (activity != null && LayoutUtil.canCaptureUserEvents(null, name)) {
972
- result = logScreenLayout(
972
+ result = logAutomaticScreenLayout(
973
973
  activity,
974
974
  name,
975
- resolveCaptureLayoutDelayMs(name, delay),
976
- true
975
+ resolveCaptureLayoutDelayMs(name, delay)
977
976
  )
978
977
  }
979
978
  return result
980
979
  }
981
980
 
981
+ /**
982
+ * Captures the layout of [activity] as an *automatic* capture — the kind
983
+ * the wrapper triggers itself, on navigation or behind a dialog — rather
984
+ * than a manual `logScreenLayout` API call from the host app.
985
+ *
986
+ * Every wrapper-initiated capture must go through here, because the
987
+ * distinction is what makes the configured `ScreenShot` value reach the
988
+ * native screenshot gate at all:
989
+ *
990
+ * - `Connect`'s four-argument overload hardcodes `manualLog = true`, and
991
+ * the native gate reads the configured `ScreenShot` only on the
992
+ * `manualLog = false` branch. Passing a literal `true` for the screenshot
993
+ * flag — which every wrapper call site used to do — therefore took the
994
+ * manual branch unconditionally, so `ScreenShot: false` could not be
995
+ * honoured from config and a full-page image shipped in every layout
996
+ * message regardless. Hence the five-argument overload, with
997
+ * `manualLog = false`.
998
+ * - [LayoutUtil.canTakeScreenShot] resolves the same merged layout rule the
999
+ * native automatic path uses (global settings as a baseline, any
1000
+ * per-screen rule applied over them). It is preferred over reading
1001
+ * `ScreenShot` directly because it is `has()`-guarded: a per-screen rule
1002
+ * that omits the key defaults to capturing rather than throwing a
1003
+ * `JSONException`, which higher up is swallowed and costs the whole
1004
+ * layout message. Its first argument may be null while the page name is
1005
+ * non-empty, the same pattern as `canCaptureUserEvents(null, name)`.
1006
+ *
1007
+ * Note `CaptureScreenshotOn` is not consulted anywhere on Android: its only
1008
+ * native reader has no callers, so `ScreenShot` is the one wired-up switch.
1009
+ *
1010
+ * [activity] is nullable to match the five-argument overload; callers that
1011
+ * need a non-null one check or assert before calling.
1012
+ */
1013
+ private fun logAutomaticScreenLayout(
1014
+ activity: Activity?,
1015
+ name: String,
1016
+ delayMs: Int
1017
+ ): Boolean {
1018
+ return logScreenLayout(
1019
+ activity,
1020
+ name,
1021
+ delayMs,
1022
+ false,
1023
+ LayoutUtil.canTakeScreenShot(null, name)
1024
+ )
1025
+ }
1026
+
982
1027
  /**
983
1028
  * Resolves the capture delay, in milliseconds, to apply for [name].
984
1029
  *
@@ -1047,12 +1092,12 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
1047
1092
  } else {
1048
1093
  Log.v(TAG, "Warning: Could not find dialog object for $dialogId after delay")
1049
1094
  // Fallback to regular screen layout capture
1050
- logScreenLayout(Objects.requireNonNull<Activity?>(getCurrentActivity()), dialogTitle, 0, true)
1095
+ logAutomaticScreenLayout(Objects.requireNonNull<Activity?>(getCurrentActivity()), dialogTitle, 0)
1051
1096
  }
1052
1097
  } catch (e: Exception) {
1053
1098
  Log.v(TAG, "Error in delayed dialog capture: ${e.message}")
1054
1099
  // Fallback to regular screen layout capture
1055
- logScreenLayout(Objects.requireNonNull<Activity?>(getCurrentActivity()), dialogTitle, 0, true)
1100
+ logAutomaticScreenLayout(Objects.requireNonNull<Activity?>(getCurrentActivity()), dialogTitle, 0)
1056
1101
  }
1057
1102
  }, DIALOG_CAPTURE_DELAY_MS) // Use configurable delay
1058
1103
 
@@ -1071,7 +1116,7 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
1071
1116
  }
1072
1117
  } else {
1073
1118
  // Default fallback
1074
- result = logScreenLayout(Objects.requireNonNull<Activity?>(getCurrentActivity()), dialogTitle, 300, true)
1119
+ result = logAutomaticScreenLayout(Objects.requireNonNull<Activity?>(getCurrentActivity()), dialogTitle, 300)
1075
1120
  }
1076
1121
  }
1077
1122
  } catch (e: Exception) {
@@ -14,6 +14,10 @@ import Foundation
14
14
  import Connect
15
15
  import NitroModules
16
16
  import OSLog
17
+ // Explicit, though `Connect`'s umbrella header pulls it in transitively:
18
+ // `logScreenLayout` resolves the top view controller itself, so this file has a
19
+ // first-hand dependency on UIApplication / UIWindowScene / UIViewController.
20
+ import UIKit
17
21
 
18
22
  // Two loggers under one subsystem so developers can filter Console.app / Xcode
19
23
  // output by category. `config` covers anything about reading and validating
@@ -732,6 +736,103 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
732
736
  return result
733
737
  }
734
738
 
739
+ /// The view controller a layout capture should describe — the iOS analogue
740
+ /// of the Android bridge's `getCurrentActivity()`.
741
+ ///
742
+ /// Mirrors the framework's own resolution (`TLFUILifeCycleAIC
743
+ /// -getDefaultVC:`, which is also what the pre-Nitro Objective-C bridge
744
+ /// did here): start at the foreground key window's root, walk the
745
+ /// `presentedViewController` chain to whatever is actually on top — a React
746
+ /// Native `<Modal>` presents its own host controller — and unwrap
747
+ /// container controllers to the child that is really showing.
748
+ ///
749
+ /// Two deliberate departures from that precedent:
750
+ ///
751
+ /// - It enumerates `UIScene`s rather than asking EOCore for the window.
752
+ /// This bridge links `Connect` only, so `EOApplicationHelper` is not
753
+ /// reachable, and scene enumeration is also the correct answer on a
754
+ /// multi-window iPad where several scenes each hold a key window.
755
+ /// - It unwraps `UITabBarController` as well as `UINavigationController`.
756
+ /// The framework only unwraps navigation controllers; capturing a tab
757
+ /// controller is not wrong (its view contains the selected child), but
758
+ /// the selected child is the screen the capture is named after.
759
+ ///
760
+ /// Must be called on the main thread — see `captureScreenLayout`.
761
+ private static func resolveTopViewController() -> UIViewController? {
762
+ let windowScenes = UIApplication.shared.connectedScenes
763
+ .compactMap { $0 as? UIWindowScene }
764
+ // Prefer the scene the user is actually looking at, but do not stop
765
+ // there: a foreground scene can exist with no window yet, while a
766
+ // merely-inactive one still holds the window that is on screen. So
767
+ // order the scenes by preference and take the first that yields a
768
+ // window, rather than committing to one scene up front.
769
+ let orderedScenes =
770
+ windowScenes.filter { $0.activationState == .foregroundActive }
771
+ + windowScenes.filter { $0.activationState != .foregroundActive }
772
+ // `keyWindow` is nil for a scene whose windows are all non-key (a
773
+ // freshly attached scene, a scene hosting only an overlay), hence the
774
+ // `windows.first` fallback.
775
+ guard let window = orderedScenes.compactMap({ $0.keyWindow ?? $0.windows.first }).first else {
776
+ return nil
777
+ }
778
+
779
+ var top = window.rootViewController
780
+ // Bounded rather than an open `while`. In practice the chain is a short
781
+ // linked list, but this runs on every navigation, so a pathological
782
+ // cycle must not hang the main thread.
783
+ var hops = 0
784
+ while hops < 32 {
785
+ hops += 1
786
+ // Presentation first: `presentedViewController` also reports a
787
+ // modal put up by a descendant, so checking it before unwrapping a
788
+ // container lands on the modal directly instead of on the
789
+ // container's child underneath it.
790
+ if let presented = top?.presentedViewController {
791
+ top = presented
792
+ continue
793
+ }
794
+ if let nav = top as? UINavigationController,
795
+ let visible = nav.topViewController {
796
+ top = visible
797
+ continue
798
+ }
799
+ if let tabs = top as? UITabBarController,
800
+ let selected = tabs.selectedViewController {
801
+ top = selected
802
+ continue
803
+ }
804
+ break
805
+ }
806
+ return top
807
+ }
808
+
809
+ /// Resolves the top view controller and hands it to the framework, as one
810
+ /// unit. **Must run on the main thread** — both halves need it:
811
+ ///
812
+ /// - `resolveTopViewController` touches UIApplication / UIWindowScene /
813
+ /// UIViewController.
814
+ /// - The framework's own overloads split on the delay.
815
+ /// `logScreenLayoutWithViewController:andDelay:andName:` wraps its work in
816
+ /// a `dispatch_after` onto the main queue and returns `YES` immediately,
817
+ /// but `logScreenLayoutWithViewController:andName:` — the `delayMs <= 0`
818
+ /// path — runs the whole view-tree walk synchronously on the *caller's*
819
+ /// thread. Calling that from the JS thread would traverse UIKit off-main.
820
+ ///
821
+ /// Returns whether the framework accepted the capture; `false` also covers
822
+ /// "no view controller resolved", which is logged here because the caller
823
+ /// may no longer be in a position to report it (see `logScreenLayout`).
824
+ @discardableResult
825
+ private static func captureScreenLayout(name: String, delayMs: Double) -> Bool {
826
+ guard let uvc = resolveTopViewController() else {
827
+ bridgeLog.error("logScreenLayout(\(name, privacy: .public)): no view controller resolved; skipping capture.")
828
+ return false
829
+ }
830
+ if delayMs <= 0 {
831
+ return ConnectCustomEvent().logScreenLayout(with: uvc, andName: name)
832
+ }
833
+ return ConnectCustomEvent().logScreenLayout(with: uvc, andDelay: delayMs / 1000.0, andName: name)
834
+ }
835
+
735
836
  /// Requests that the framework logs the layout of the screen.
736
837
  ///
737
838
  /// - Parameters:
@@ -752,8 +853,16 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
752
853
  /// with no reference to the configured delay at all. Sending 0 for every
753
854
  /// screen — which the wrapper used to do — therefore fired the capture
754
855
  /// mid-transition and made `CaptureLayoutDelay` inert on iOS.
856
+ ///
857
+ /// The view controller used to be a hardcoded nil, and a nil controller is
858
+ /// not benign: the framework's layout processor guards on a non-nil
859
+ /// controller and reports failure without queueing anything, so every
860
+ /// JS-triggered capture on iOS produced no layout message at all — while
861
+ /// the deferred overload still returned true the moment it scheduled, so
862
+ /// the bridge reported success for a capture that never happened.
755
863
  func logScreenLayout(name: String, delay: Double) throws -> Bool {
756
- let uvc: UIViewController! = nil
864
+ // Config reads only — safe on any thread, and cheap enough to do before
865
+ // the hop so the closure below captures plain values.
757
866
  let configuredLayout = consumerSuppliedAutoLayout
758
867
  ? ConnectConfigStore.dictionary(forKey: ConnectRNParsing.autoLayoutConfigKey)
759
868
  : nil
@@ -761,10 +870,29 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
761
870
  ? ConnectRNParsing.captureLayoutDelayMs(for: name, in: configuredLayout)
762
871
  : delay
763
872
 
764
- if delayMs <= 0 {
765
- return ConnectCustomEvent().logScreenLayout(with: uvc, andName: name)
873
+ // Already on main: run inline and report what the framework actually
874
+ // said. This is the only path that can return a truthful failure.
875
+ if Thread.isMainThread {
876
+ return Self.captureScreenLayout(name: name, delayMs: delayMs)
766
877
  }
767
- return ConnectCustomEvent().logScreenLayout(with: uvc, andDelay: delayMs / 1000.0, andName: name)
878
+
879
+ // Off main — in practice the JS thread. Dispatch **async**, never
880
+ // `sync`: the main thread can itself synchronously wait on the JS
881
+ // thread (an established React Native / Fabric pattern, the
882
+ // `RCTUnsafeExecuteOnMainQueueSync` family), so a blocking hop from
883
+ // here inverts the lock order and can deadlock the app on an ordinary
884
+ // navigation. Async costs the return value — resolution and the
885
+ // framework call both happen after this method has returned — so a
886
+ // failure surfaces in the log inside `captureScreenLayout` rather than
887
+ // in the result, and `true` here means "capture scheduled", exactly the
888
+ // semantics the framework's own delayed overload already has.
889
+ // Named explicitly rather than through `Self` so this escaping closure
890
+ // captures nothing but the two value parameters — no reference to the
891
+ // HybridObject outlives the call.
892
+ DispatchQueue.main.async {
893
+ HybridAcousticConnectRN.captureScreenLayout(name: name, delayMs: delayMs)
894
+ }
895
+ return true
768
896
  }
769
897
 
770
898
  /// Logs a dialog show event with the specified dialog information.
@@ -107,12 +107,23 @@ const Connect = ({
107
107
  // Listen for the 'state' event to track navigation state changes
108
108
  const unsubscribeState = navigation.current.addListener("state", () => {
109
109
  currentRoute.current = extractName(navigation) || navigation.current.getCurrentRoute()?.name;
110
- if (_reactNative.Platform.OS === "ios" && currentRoute && currentRoute.current) {
111
- _TLTRN.default.logScreenViewPageName(currentRoute.current);
112
- } else if (_reactNative.Platform.OS === "android") {
113
- _TLTRN.default.logScreenViewPageName(currentRoute.current);
114
- _TLTRN.default.logScreenLayout(currentRoute.current);
110
+
111
+ // Both platforms take the same path. iOS used to be excluded from
112
+ // the layout call, which left the wrapper with no layout trigger
113
+ // at all there: the one remaining bridge caller was TLTRN's
114
+ // render-settle timer, so a plain navigation captured nothing.
115
+ if (!currentRoute.current) {
116
+ return;
115
117
  }
118
+ _TLTRN.default.logScreenViewPageName(currentRoute.current);
119
+ // Deliberately no delay argument. TLTRN then sends its
120
+ // "use the configured CaptureLayoutDelay" sentinel, so the capture
121
+ // is deferred past the transition. Passing 0 would select the
122
+ // native synchronous overload instead, which captures on the
123
+ // calling thread at the *start* of the transition — React
124
+ // Navigation fires 'state' before the animation runs — and makes
125
+ // CaptureLayoutDelay inert.
126
+ _TLTRN.default.logScreenLayout(currentRoute.current);
116
127
  });
117
128
 
118
129
  // Cleanup listeners when the component unmounts or dependencies change
@@ -137,9 +148,12 @@ const Connect = ({
137
148
  initial.current = true;
138
149
  if (navigation?.current?.getCurrentRoute) {
139
150
  currentRoute.current = navigation.current.getCurrentRoute()?.name;
140
- if (_reactNative.Platform.OS === "ios" && currentRoute.current) {
151
+ // Same unification as the 'state' listener above: the split sent
152
+ // only a screenview on iOS and only a layout on Android, so
153
+ // neither platform got both from the first-paint trigger. No delay
154
+ // argument, for the reason given there.
155
+ if (currentRoute.current) {
141
156
  _TLTRN.default.logScreenViewPageName(currentRoute.current);
142
- } else if (_reactNative.Platform.OS === "android") {
143
157
  _TLTRN.default.logScreenLayout(currentRoute.current);
144
158
  }
145
159
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_TLTRN","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Connect","children","captureKeyboardEvents","captureDialogEvents","navigationRef","child","childProvidedRef","props","ref","internalRef","useRef","navigation","shouldInjectRef","React","isValidElement","currentRoute","undefined","initial","navReady","setNavReady","useState","useEffect","TLTRN","interceptKeyboardEvents","interceptDialogEvents","isUsable","current","addListener","getCurrentRoute","attempts","POLL_INTERVAL_MS","MAX_ATTEMPTS","timer","poll","console","warn","setTimeout","clearTimeout","unsubscribeState","extractName","name","Platform","OS","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","useCallback","event","logClickEvent","onLayout","_event","jsx","View","style","styles","connect_main","cloneElement","routeParams","params","_default","exports","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/Connect.tsx"],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA6B,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAM,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAG,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OAAO;AAEtB,MAAMsD,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC7BP,YAAY,EAAE;IACVQ,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_TLTRN","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Connect","children","captureKeyboardEvents","captureDialogEvents","navigationRef","child","childProvidedRef","props","ref","internalRef","useRef","navigation","shouldInjectRef","React","isValidElement","currentRoute","undefined","initial","navReady","setNavReady","useState","useEffect","TLTRN","interceptKeyboardEvents","interceptDialogEvents","isUsable","current","addListener","getCurrentRoute","attempts","POLL_INTERVAL_MS","MAX_ATTEMPTS","timer","poll","console","warn","setTimeout","clearTimeout","unsubscribeState","extractName","name","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","useCallback","event","logClickEvent","onLayout","_event","jsx","View","style","styles","connect_main","cloneElement","routeParams","params","_default","exports","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/Connect.tsx"],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA6B,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAM,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAA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AAO,EAAEE,eAAe,GAAG,CAAC,EAAE4B,MAAM;EACpE,IAAID,WAAW,EAAE;IACb,MAAM;MAAEf;IAAK,CAAC,GAAGe,WAAW;IAC5B,OAAOf,IAAI,GAAGA,IAAI,GAAG7B,UAAU,CAACe,OAAO,EAAEE,eAAe,CAAC,CAAC,EAAEY,IAAI,IAAI,EAAE;EAC1E;EACA,OAAO,EAAE;AACb;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAA3E,OAAA,GAEciB,OAAO;AAEtB,MAAMoD,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC7BP,YAAY,EAAE;IACVQ,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -10,7 +10,7 @@
10
10
  * prohibited.
11
11
  ********************************************************************************************/
12
12
  import React, { useCallback, useEffect, useRef, useState } from "react";
13
- import { View, StyleSheet, Platform } from "react-native";
13
+ import { View, StyleSheet } from "react-native";
14
14
  // Use type-only import for LayoutChangeEvent
15
15
  import TLTRN from '../TLTRN';
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -99,12 +99,23 @@ const Connect = ({
99
99
  // Listen for the 'state' event to track navigation state changes
100
100
  const unsubscribeState = navigation.current.addListener("state", () => {
101
101
  currentRoute.current = extractName(navigation) || navigation.current.getCurrentRoute()?.name;
102
- if (Platform.OS === "ios" && currentRoute && currentRoute.current) {
103
- TLTRN.logScreenViewPageName(currentRoute.current);
104
- } else if (Platform.OS === "android") {
105
- TLTRN.logScreenViewPageName(currentRoute.current);
106
- TLTRN.logScreenLayout(currentRoute.current);
102
+
103
+ // Both platforms take the same path. iOS used to be excluded from
104
+ // the layout call, which left the wrapper with no layout trigger
105
+ // at all there: the one remaining bridge caller was TLTRN's
106
+ // render-settle timer, so a plain navigation captured nothing.
107
+ if (!currentRoute.current) {
108
+ return;
107
109
  }
110
+ TLTRN.logScreenViewPageName(currentRoute.current);
111
+ // Deliberately no delay argument. TLTRN then sends its
112
+ // "use the configured CaptureLayoutDelay" sentinel, so the capture
113
+ // is deferred past the transition. Passing 0 would select the
114
+ // native synchronous overload instead, which captures on the
115
+ // calling thread at the *start* of the transition — React
116
+ // Navigation fires 'state' before the animation runs — and makes
117
+ // CaptureLayoutDelay inert.
118
+ TLTRN.logScreenLayout(currentRoute.current);
108
119
  });
109
120
 
110
121
  // Cleanup listeners when the component unmounts or dependencies change
@@ -129,9 +140,12 @@ const Connect = ({
129
140
  initial.current = true;
130
141
  if (navigation?.current?.getCurrentRoute) {
131
142
  currentRoute.current = navigation.current.getCurrentRoute()?.name;
132
- if (Platform.OS === "ios" && currentRoute.current) {
143
+ // Same unification as the 'state' listener above: the split sent
144
+ // only a screenview on iOS and only a layout on Android, so
145
+ // neither platform got both from the first-paint trigger. No delay
146
+ // argument, for the reason given there.
147
+ if (currentRoute.current) {
133
148
  TLTRN.logScreenViewPageName(currentRoute.current);
134
- } else if (Platform.OS === "android") {
135
149
  TLTRN.logScreenLayout(currentRoute.current);
136
150
  }
137
151
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useRef","useState","View","StyleSheet","Platform","TLTRN","jsx","_jsx","Connect","children","captureKeyboardEvents","captureDialogEvents","navigationRef","child","childProvidedRef","props","ref","internalRef","navigation","shouldInjectRef","isValidElement","currentRoute","undefined","initial","navReady","setNavReady","interceptKeyboardEvents","interceptDialogEvents","isUsable","current","addListener","getCurrentRoute","attempts","POLL_INTERVAL_MS","MAX_ATTEMPTS","timer","poll","console","warn","setTimeout","clearTimeout","unsubscribeState","extractName","name","OS","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","event","logClickEvent","onLayout","_event","style","styles","connect_main","cloneElement","routeParams","params","create","flex"],"sourceRoot":"../../../src","sources":["components/Connect.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;A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,IAAIvC,QAAQ,CAACwC,EAAE,KAAK,KAAK,IAAIvB,YAAY,CAACQ,OAAO,EAAE;QAC/CxB,KAAK,CAACwC,qBAAqB,CAACxB,YAAY,CAACQ,OAAO,CAAC;MACrD,CAAC,MAAM,IAAIzB,QAAQ,CAACwC,EAAE,KAAK,SAAS,EAAE;QAClCvC,KAAK,CAACyC,eAAe,CAACzB,YAAY,CAACQ,OAAO,CAAC;MAC/C;IACJ;IACA,OAAO,IAAI;EACf,CAAC,EAAE,CAACX,UAAU,CAAC,CAAC;EAEhB,oBACIX,IAAA,CAACL,IAAI;IACDkD,KAAK,EAAEC,MAAM,CAACC,YAAa;IAC3BJ,QAAQ,EAAEA,QAAS;IACnBH,gCAAgC,EAAEA,gCAAiC;IAAAtC,QAAA,EAElEU,eAAe,gBACVtB,KAAK,CAAC0D,YAAY,CAAC1C,KAAK,EAA6B;MAAEG,GAAG,EAAEC;IAAY,CAAC,CAAC,GAC1ER;EAAQ,CACZ,CAAC;AAEf,CAAC;AAED,SAASiC,WAAWA,CAACxB,UAAe,EAAU;EAC1C,MAAMsC,WAAW,GAAGtC,UAAU,EAAEW,OAAO,EAAEE,eAAe,GAAG,CAAC,EAAE0B,MAAM;EACpE,IAAID,WAAW,EAAE;IACb,MAAM;MAAEb;IAAK,CAAC,GAAGa,WAAW;IAC5B,OAAOb,IAAI,GAAGA,IAAI,GAAGzB,UAAU,CAACW,OAAO,EAAEE,eAAe,CAAC,CAAC,EAAEY,IAAI,IAAI,EAAE;EAC1E;EACA,OAAO,EAAE;AACb;AAEA,eAAenC,OAAO;AAEtB,MAAM6C,MAAM,GAAGlD,UAAU,CAACuD,MAAM,CAAC;EAC7BJ,YAAY,EAAE;IACVK,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useRef","useState","View","StyleSheet","TLTRN","jsx","_jsx","Connect","children","captureKeyboardEvents","captureDialogEvents","navigationRef","child","childProvidedRef","props","ref","internalRef","navigation","shouldInjectRef","isValidElement","currentRoute","undefined","initial","navReady","setNavReady","interceptKeyboardEvents","interceptDialogEvents","isUsable","current","addListener","getCurrentRoute","attempts","POLL_INTERVAL_MS","MAX_ATTEMPTS","timer","poll","console","warn","setTimeout","clearTimeout","unsubscribeState","extractName","name","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","event","logClickEvent","onLayout","_event","style","styles","connect_main","cloneElement","routeParams","params","create","flex"],"sourceRoot":"../../../src","sources":["components/Connect.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACQ;AACvD,OAAOC,KAAK,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAoB7B,MAAMC,OAA+B,GAAGA,CAAC;EACrCC,QAAQ;EACRC,qBAAqB;EACrBC,mBAAmB,GAAG,KAAK;EAC3BC;AACJ,CAAC,KAAK;EACF,MAAMC,KAAK,GAAGJ,QAAe;EAC7B;EACA;EACA;EACA,MAAMK,gBAAgB,GAAGD,KAAK,EAAEE,KAAK,EAAEC,GAAG,IAAIH,KAAK,EAAEG,GAAG;EACxD,MAAMC,WAAW,GAAGhB,MAAM,CAAM,IAAI,CAAC;;EAErC;EACA;EACA;EACA;EACA,MAAMiB,UAAU,GAAGN,aAAa,IAAIE,gBAAgB,IAAIG,WAAW;EACnE,MAAME,eAAe,GACjB,CAACP,aAAa,IAAI,CAACE,gBAAgB,iBAAIhB,KAAK,CAACsB,cAAc,CAACP,KAAK,CAAC;EAEtE,MAAMQ,YAAY,GAAGpB,MAAM,CAAqBqB,SAAS,CAAC;EAC1D,MAAMC,OAAO,GAAGtB,MAAM,CAAU,KAAK,CAAC;EACtC;EACA;EACA,MAAM,CAACuB,QAAQ,EAAEC,WAAW,CAAC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MAAM,GAAGhD,UAAU,CAACqD,MAAM,CAAC;EAC7BJ,YAAY,EAAE;IACVK,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../../src/components/Connect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;6FAQ6F;AAC7F,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,YAAY;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA6JnC,CAAC;AAWF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../../src/components/Connect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;6FAQ6F;AAC7F,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,YAAY;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA0KnC,CAAC;AAWF,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -230,7 +230,7 @@
230
230
  "source": "src/index",
231
231
  "summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
232
232
  "types": "./lib/typescript/src/index.d.ts",
233
- "version": "19.0.18",
233
+ "version": "19.0.19",
234
234
  "workspaces": [
235
235
  "example",
236
236
  "Examples/bare-workflow"
@@ -8,7 +8,7 @@
8
8
  * prohibited.
9
9
  ********************************************************************************************/
10
10
  import React, { useCallback, useEffect, useRef, useState } from "react";
11
- import { View, StyleSheet, Platform } from "react-native";
11
+ import { View, StyleSheet } from "react-native";
12
12
  import type { LayoutChangeEvent } from "react-native"; // Use type-only import for LayoutChangeEvent
13
13
  import TLTRN from '../TLTRN';
14
14
 
@@ -133,12 +133,22 @@ const Connect: React.FC<ConnectProps> = ({
133
133
  const unsubscribeState = navigation.current.addListener("state", () => {
134
134
  currentRoute.current = extractName(navigation) || navigation.current.getCurrentRoute()?.name;
135
135
 
136
- if (Platform.OS === "ios" && currentRoute && currentRoute.current) {
137
- TLTRN.logScreenViewPageName(currentRoute.current);
138
- } else if (Platform.OS === "android") {
139
- TLTRN.logScreenViewPageName(currentRoute.current);
140
- TLTRN.logScreenLayout(currentRoute.current);
136
+ // Both platforms take the same path. iOS used to be excluded from
137
+ // the layout call, which left the wrapper with no layout trigger
138
+ // at all there: the one remaining bridge caller was TLTRN's
139
+ // render-settle timer, so a plain navigation captured nothing.
140
+ if (!currentRoute.current) {
141
+ return;
141
142
  }
143
+ TLTRN.logScreenViewPageName(currentRoute.current);
144
+ // Deliberately no delay argument. TLTRN then sends its
145
+ // "use the configured CaptureLayoutDelay" sentinel, so the capture
146
+ // is deferred past the transition. Passing 0 would select the
147
+ // native synchronous overload instead, which captures on the
148
+ // calling thread at the *start* of the transition — React
149
+ // Navigation fires 'state' before the animation runs — and makes
150
+ // CaptureLayoutDelay inert.
151
+ TLTRN.logScreenLayout(currentRoute.current);
142
152
  });
143
153
 
144
154
  // Cleanup listeners when the component unmounts or dependencies change
@@ -167,9 +177,12 @@ const Connect: React.FC<ConnectProps> = ({
167
177
 
168
178
  if (navigation?.current?.getCurrentRoute) {
169
179
  currentRoute.current = navigation.current.getCurrentRoute()?.name;
170
- if (Platform.OS === "ios" && currentRoute.current) {
180
+ // Same unification as the 'state' listener above: the split sent
181
+ // only a screenview on iOS and only a layout on Android, so
182
+ // neither platform got both from the first-paint trigger. No delay
183
+ // argument, for the reason given there.
184
+ if (currentRoute.current) {
171
185
  TLTRN.logScreenViewPageName(currentRoute.current);
172
- } else if (Platform.OS === "android") {
173
186
  TLTRN.logScreenLayout(currentRoute.current);
174
187
  }
175
188
  }