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

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.
@@ -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
@@ -570,6 +574,34 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
570
574
  func logCustomEvent(eventName: String, values: Dictionary<String, Variant_Bool_String_Double>, level: Double) throws -> Bool {
571
575
  let logLevel = try getLogLevel(level: level)
572
576
  let result = ConnectCustomEvent().logEvent(eventName, values: convertToAnyDictionary(input: values), level: logLevel)
577
+ return Self.warnIfRejected(result, api: "logCustomEvent", detail: eventName)
578
+ }
579
+
580
+ /// Surfaces a `false` returned by a native logging call, and passes it
581
+ /// through unchanged.
582
+ ///
583
+ /// The bridge's boolean means "the SDK accepted this for delivery", never
584
+ /// "the collector received it" — nothing on the device knows the latter.
585
+ /// But the *accepted* half was itself invisible: a `false` reached JS as a
586
+ /// bare return value that the wrapper's callers almost never inspect, with
587
+ /// nothing in `os_log`. Callers reporting "the event never arrived" had no
588
+ /// way to tell a rejected call from a delivery problem. One line at
589
+ /// `.warning` distinguishes them.
590
+ ///
591
+ /// Deliberately does not change the return value or throw: an analytics
592
+ /// bridge must not turn a rejected event into an app-visible failure.
593
+ ///
594
+ /// - Parameters:
595
+ /// - result: The value the native call returned.
596
+ /// - api: Name of the bridge method, for the log line.
597
+ /// - detail: Optional extra identifier, e.g. an event name.
598
+ /// - Returns: `result`, unchanged.
599
+ @discardableResult
600
+ private static func warnIfRejected(_ result: Bool, api: String, detail: String? = nil) -> Bool {
601
+ if !result {
602
+ let suffix = detail.map { " (\($0))" } ?? ""
603
+ bridgeLog.warning("\(api, privacy: .public)\(suffix, privacy: .public): the Connect SDK did not accept the event; nothing was queued for delivery. Check that the SDK is enabled and the payload is valid.")
604
+ }
573
605
  return result
574
606
  }
575
607
 
@@ -592,7 +624,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
592
624
  let logLevel = try getLogLevel(level: level)
593
625
  let payload = ConnectRNParsing.jsonSafeDictionary(values.toDictionary())
594
626
  let result = ConnectCustomEvent().logSignal(payload, level: logLevel)
595
- return result
627
+ return Self.warnIfRejected(result, api: "logSignal")
596
628
  }
597
629
 
598
630
  /// Logs a user identity so device activity can be associated with a known
@@ -622,12 +654,18 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
622
654
  let resolvedParameters = additionalParameters
623
655
  ?? ConnectRNParsing.defaultIdentityParameters(for: resolvedSignalType)
624
656
  return Promise.async { @MainActor in
625
- ConnectSDK.shared.identity.log(
657
+ let result = ConnectSDK.shared.identity.log(
626
658
  identifierName: identifierName,
627
659
  identifierValue: identifierValue,
628
660
  signalType: resolvedSignalType,
629
661
  additionalParameters: resolvedParameters
630
662
  )
663
+ // An identity signal the SDK accepts can still be rejected
664
+ // downstream by schema validation — a mismatched method attribute
665
+ // has cost a customer 22 signals while every call reported
666
+ // success. The bridge cannot see that; it can at least report the
667
+ // half it does see.
668
+ return HybridAcousticConnectRN.warnIfRejected(result, api: "logIdentity", detail: resolvedSignalType)
631
669
  }
632
670
  }
633
671
 
@@ -732,6 +770,103 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
732
770
  return result
733
771
  }
734
772
 
773
+ /// The view controller a layout capture should describe — the iOS analogue
774
+ /// of the Android bridge's `getCurrentActivity()`.
775
+ ///
776
+ /// Mirrors the framework's own resolution (`TLFUILifeCycleAIC
777
+ /// -getDefaultVC:`, which is also what the pre-Nitro Objective-C bridge
778
+ /// did here): start at the foreground key window's root, walk the
779
+ /// `presentedViewController` chain to whatever is actually on top — a React
780
+ /// Native `<Modal>` presents its own host controller — and unwrap
781
+ /// container controllers to the child that is really showing.
782
+ ///
783
+ /// Two deliberate departures from that precedent:
784
+ ///
785
+ /// - It enumerates `UIScene`s rather than asking EOCore for the window.
786
+ /// This bridge links `Connect` only, so `EOApplicationHelper` is not
787
+ /// reachable, and scene enumeration is also the correct answer on a
788
+ /// multi-window iPad where several scenes each hold a key window.
789
+ /// - It unwraps `UITabBarController` as well as `UINavigationController`.
790
+ /// The framework only unwraps navigation controllers; capturing a tab
791
+ /// controller is not wrong (its view contains the selected child), but
792
+ /// the selected child is the screen the capture is named after.
793
+ ///
794
+ /// Must be called on the main thread — see `captureScreenLayout`.
795
+ private static func resolveTopViewController() -> UIViewController? {
796
+ let windowScenes = UIApplication.shared.connectedScenes
797
+ .compactMap { $0 as? UIWindowScene }
798
+ // Prefer the scene the user is actually looking at, but do not stop
799
+ // there: a foreground scene can exist with no window yet, while a
800
+ // merely-inactive one still holds the window that is on screen. So
801
+ // order the scenes by preference and take the first that yields a
802
+ // window, rather than committing to one scene up front.
803
+ let orderedScenes =
804
+ windowScenes.filter { $0.activationState == .foregroundActive }
805
+ + windowScenes.filter { $0.activationState != .foregroundActive }
806
+ // `keyWindow` is nil for a scene whose windows are all non-key (a
807
+ // freshly attached scene, a scene hosting only an overlay), hence the
808
+ // `windows.first` fallback.
809
+ guard let window = orderedScenes.compactMap({ $0.keyWindow ?? $0.windows.first }).first else {
810
+ return nil
811
+ }
812
+
813
+ var top = window.rootViewController
814
+ // Bounded rather than an open `while`. In practice the chain is a short
815
+ // linked list, but this runs on every navigation, so a pathological
816
+ // cycle must not hang the main thread.
817
+ var hops = 0
818
+ while hops < 32 {
819
+ hops += 1
820
+ // Presentation first: `presentedViewController` also reports a
821
+ // modal put up by a descendant, so checking it before unwrapping a
822
+ // container lands on the modal directly instead of on the
823
+ // container's child underneath it.
824
+ if let presented = top?.presentedViewController {
825
+ top = presented
826
+ continue
827
+ }
828
+ if let nav = top as? UINavigationController,
829
+ let visible = nav.topViewController {
830
+ top = visible
831
+ continue
832
+ }
833
+ if let tabs = top as? UITabBarController,
834
+ let selected = tabs.selectedViewController {
835
+ top = selected
836
+ continue
837
+ }
838
+ break
839
+ }
840
+ return top
841
+ }
842
+
843
+ /// Resolves the top view controller and hands it to the framework, as one
844
+ /// unit. **Must run on the main thread** — both halves need it:
845
+ ///
846
+ /// - `resolveTopViewController` touches UIApplication / UIWindowScene /
847
+ /// UIViewController.
848
+ /// - The framework's own overloads split on the delay.
849
+ /// `logScreenLayoutWithViewController:andDelay:andName:` wraps its work in
850
+ /// a `dispatch_after` onto the main queue and returns `YES` immediately,
851
+ /// but `logScreenLayoutWithViewController:andName:` — the `delayMs <= 0`
852
+ /// path — runs the whole view-tree walk synchronously on the *caller's*
853
+ /// thread. Calling that from the JS thread would traverse UIKit off-main.
854
+ ///
855
+ /// Returns whether the framework accepted the capture; `false` also covers
856
+ /// "no view controller resolved", which is logged here because the caller
857
+ /// may no longer be in a position to report it (see `logScreenLayout`).
858
+ @discardableResult
859
+ private static func captureScreenLayout(name: String, delayMs: Double) -> Bool {
860
+ guard let uvc = resolveTopViewController() else {
861
+ bridgeLog.error("logScreenLayout(\(name, privacy: .public)): no view controller resolved; skipping capture.")
862
+ return false
863
+ }
864
+ if delayMs <= 0 {
865
+ return ConnectCustomEvent().logScreenLayout(with: uvc, andName: name)
866
+ }
867
+ return ConnectCustomEvent().logScreenLayout(with: uvc, andDelay: delayMs / 1000.0, andName: name)
868
+ }
869
+
735
870
  /// Requests that the framework logs the layout of the screen.
736
871
  ///
737
872
  /// - Parameters:
@@ -752,8 +887,16 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
752
887
  /// with no reference to the configured delay at all. Sending 0 for every
753
888
  /// screen — which the wrapper used to do — therefore fired the capture
754
889
  /// mid-transition and made `CaptureLayoutDelay` inert on iOS.
890
+ ///
891
+ /// The view controller used to be a hardcoded nil, and a nil controller is
892
+ /// not benign: the framework's layout processor guards on a non-nil
893
+ /// controller and reports failure without queueing anything, so every
894
+ /// JS-triggered capture on iOS produced no layout message at all — while
895
+ /// the deferred overload still returned true the moment it scheduled, so
896
+ /// the bridge reported success for a capture that never happened.
755
897
  func logScreenLayout(name: String, delay: Double) throws -> Bool {
756
- let uvc: UIViewController! = nil
898
+ // Config reads only — safe on any thread, and cheap enough to do before
899
+ // the hop so the closure below captures plain values.
757
900
  let configuredLayout = consumerSuppliedAutoLayout
758
901
  ? ConnectConfigStore.dictionary(forKey: ConnectRNParsing.autoLayoutConfigKey)
759
902
  : nil
@@ -761,10 +904,29 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
761
904
  ? ConnectRNParsing.captureLayoutDelayMs(for: name, in: configuredLayout)
762
905
  : delay
763
906
 
764
- if delayMs <= 0 {
765
- return ConnectCustomEvent().logScreenLayout(with: uvc, andName: name)
907
+ // Already on main: run inline and report what the framework actually
908
+ // said. This is the only path that can return a truthful failure.
909
+ if Thread.isMainThread {
910
+ return Self.captureScreenLayout(name: name, delayMs: delayMs)
766
911
  }
767
- return ConnectCustomEvent().logScreenLayout(with: uvc, andDelay: delayMs / 1000.0, andName: name)
912
+
913
+ // Off main — in practice the JS thread. Dispatch **async**, never
914
+ // `sync`: the main thread can itself synchronously wait on the JS
915
+ // thread (an established React Native / Fabric pattern, the
916
+ // `RCTUnsafeExecuteOnMainQueueSync` family), so a blocking hop from
917
+ // here inverts the lock order and can deadlock the app on an ordinary
918
+ // navigation. Async costs the return value — resolution and the
919
+ // framework call both happen after this method has returned — so a
920
+ // failure surfaces in the log inside `captureScreenLayout` rather than
921
+ // in the result, and `true` here means "capture scheduled", exactly the
922
+ // semantics the framework's own delayed overload already has.
923
+ // Named explicitly rather than through `Self` so this escaping closure
924
+ // captures nothing but the two value parameters — no reference to the
925
+ // HybridObject outlives the call.
926
+ DispatchQueue.main.async {
927
+ HybridAcousticConnectRN.captureScreenLayout(name: name, delayMs: delayMs)
928
+ }
929
+ return true
768
930
  }
769
931
 
770
932
  /// Logs a dialog show event with the specified dialog information.
@@ -124,6 +124,14 @@ class TLTRN {
124
124
  * Passing no delay used to send a hardcoded `0`, which made
125
125
  * `CaptureLayoutDelay` inert for React Native apps and fired the capture at
126
126
  * the *start* of the transition rather than after it.
127
+ *
128
+ * @returns With no `delayMs` — the normal case — only that the capture was
129
+ * **scheduled**, not that it produced a layout message. The native
130
+ * deferred overload dispatches and returns immediately, so anything that
131
+ * goes wrong once it runs (no view controller resolved, layout capture
132
+ * gated off by config) cannot be reflected here; those surface in logcat
133
+ * / os_log instead. Pass `0` and the value describes the capture itself,
134
+ * at the cost of capturing mid-transition.
127
135
  */
128
136
  static logScreenLayout = (name, delayMs) => {
129
137
  TLTRN.currentScreen = name || '';
@@ -177,8 +185,82 @@ class TLTRN {
177
185
  }
178
186
  return result;
179
187
  };
188
+
189
+ /**
190
+ * Keys already warned about, so a call site inside a render or a list loop
191
+ * warns once rather than on every pass.
192
+ */
193
+ static warnedNestedValueSites = new Set();
194
+
195
+ /**
196
+ * Cap on {@link warnedNestedValueSites}.
197
+ *
198
+ * The site key includes the nested keys' names, so a payload built from an
199
+ * API response — per-record ids, timestamps — makes every call a distinct
200
+ * site, and the set would then grow for the life of the session. By the
201
+ * hundredth distinct shape the warning has made its point, so it stops
202
+ * instead of accumulating: bounded memory matters more than warning about
203
+ * shape 101.
204
+ */
205
+ static WARNED_NESTED_VALUE_SITES_MAX = 100;
206
+
207
+ /**
208
+ * Warns when a flat-values payload carries a nested object or array.
209
+ *
210
+ * `logCustomEvent`/`logDialogCustomEvent` are typed for flat scalars, but
211
+ * TypeScript types are erased at runtime: a payload built from an API
212
+ * response, widened through `any`, or passed from untyped JS reaches the
213
+ * bridge with its nesting intact. Both platforms then reshape it silently —
214
+ * Android's SDK chain is typed `HashMap<String, String>` end to end, so a
215
+ * nested value is stringified into whatever its `toString()` yields — and
216
+ * the call still returns `true`. `logSignal` is the API that carries nested
217
+ * JSON on both platforms.
218
+ *
219
+ * Warning only: the payload is passed through untouched, so this changes no
220
+ * behaviour and cannot break a caller who is relying on today's reshaping.
221
+ *
222
+ * @param api Name of the calling API, for the message.
223
+ * @param values The payload about to cross the bridge.
224
+ */
225
+ static warnOnNestedValues = (api, values) => {
226
+ if (values == null || typeof values !== 'object') {
227
+ return;
228
+ }
229
+ const nested = Object.keys(values).filter(key => {
230
+ const value = values[key];
231
+ return typeof value === 'object' && value !== null;
232
+ });
233
+ if (nested.length === 0) {
234
+ return;
235
+ }
236
+ const site = `${api}:${nested.sort().join(',')}`;
237
+ if (TLTRN.warnedNestedValueSites.has(site)) {
238
+ return;
239
+ }
240
+ if (TLTRN.warnedNestedValueSites.size >= TLTRN.WARNED_NESTED_VALUE_SITES_MAX) {
241
+ return;
242
+ }
243
+ TLTRN.warnedNestedValueSites.add(site);
244
+ console.warn(`TLTRN.${api}: nested value(s) [${nested.sort().join(', ')}] will be flattened — ` + `${api} carries flat scalars only, and the native SDKs reshape anything else ` + `without reporting it. Use logSignal for nested JSON; it is carried intact on ` + `both platforms.`);
245
+ };
246
+
247
+ /**
248
+ * Logs a custom event.
249
+ *
250
+ * @param eventName Event name, as it appears in the posted JSON.
251
+ * @param values Flat key/value pairs. Nested objects and arrays are NOT
252
+ * supported here and are reshaped by the native SDKs — use `logSignal`
253
+ * for nested JSON.
254
+ * @param level Monitoring level for this event.
255
+ * @returns Whether the native SDK **accepted the event for delivery** —
256
+ * not whether the collector received it. The event is queued locally and
257
+ * posted later, so no return value from this call can attest to delivery;
258
+ * a `true` here means only that the SDK took the event. A `false` is also
259
+ * logged natively (logcat / os_log) so the rejection is visible.
260
+ */
180
261
  static logCustomEvent = async (eventName, values, level) => {
181
262
  let result = false;
263
+ TLTRN.warnOnNestedValues('logCustomEvent', values);
182
264
  try {
183
265
  result = _index.default.logCustomEvent(eventName, values, level);
184
266
  } catch (error) {
@@ -215,8 +297,16 @@ class TLTRN {
215
297
  }
216
298
  return result;
217
299
  };
300
+
301
+ /**
302
+ * Logs a custom event tied to a dialog.
303
+ *
304
+ * Same flat-values contract and same return-value meaning as
305
+ * {@link logCustomEvent} — it routes to the same native API.
306
+ */
218
307
  static logDialogCustomEvent = async (dialogId, eventName, values) => {
219
308
  let result = false;
309
+ TLTRN.warnOnNestedValues('logDialogCustomEvent', values);
220
310
  try {
221
311
  result = _index.default.logDialogCustomEvent(dialogId, eventName, values);
222
312
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"names":["_MessageQueue","_interopRequireDefault","require","_reactNative","_KeyboardListener","_DialogListener","_index","e","__esModule","default","previousGlobalErrorHandler","global","ErrorUtils","getGlobalHandler","setGlobalHandler","isFatal","AcousticConnectRN","logExceptionEvent","JSON","stringify","loggingError","console","warn","message","TLTRN","currentScreen","lastJSBridgeMessageTime","totalRenderTime","messageRenderTime","countMsgs","messageConsole","lastMessageConsole","isLoggingData","displayDebug","myTimer","handle","started","time","startTimer","setInterval","checkTime","stopTimer","clearInterval","init","initialCurrentScreen","showDebugConsoleMessages","undefined","currentScreenMsg","MessageQueue","spy","listenToBridge","interceptKeyboardEvents","enable","keyListener","logScreenViewPageName","name","result","setCurrentScreenName","error","log","logScreenViewContextLoad","prevName","USE_CONFIGURED_CAPTURE_DELAY","logScreenLayout","delayMs","logClickEvent","event","target","__nativeTag","_nativeTag","controlId","fiberId","_targetInst","memoizedProps","id","length","Array","isArray","_dispatchInstances","found","find","node","logTextChangeEvent","text","_ariaLabel","Platform","OS","logCustomEvent","eventName","values","level","logDialogShowEvent","dialogId","dialogTitle","dialogType","logDialogDismissEvent","dismissReason","logDialogButtonClickEvent","buttonText","buttonIndex","logDialogCustomEvent","eventListenerRegistered","eventListenerUnsubscribe","interceptDialogEvents","dialogListener","DialogListener","getInstance","startIntercepting","addEventListener","stopIntercepting","now","Date","getTime","from","type","data","module","method","args","logTeal","res","dict","ReactLayoutTime","KeyboardListener","_instance","_default","exports"],"sourceRoot":"../../src","sources":["TLTRN.ts"],"mappings":";;;;;;AAWA,IAAAA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GAAG;QAAEC,eAAe,EAAElG,KAAK,CAACG;MAAgB,CAAC;MACrD,IAAI6B,MAAM,GAAG,MAAMxC,cAAiB,CAACuE,cAAc,CAAC,aAAa,EAAEkC,IAAI,EAAE,CAAC,CAAC;MAC3E,IAAIjG,KAAK,CAACS,YAAY,EAAE;QACtBZ,OAAO,CAACsC,GAAG,CACT,iBAAiB,GACfnC,KAAK,CAACC,aAAa,GACnB,GAAG,GACH+F,GAAG,GACH,QAAQ,GACRhG,KAAK,CAACG,eACV,CAAC;MACH;MACAH,KAAK,CAACQ,aAAa,GAAG,CAAC;MACvBR,KAAK,CAACE,uBAAuB,GAAG,CAAC;MACjCF,KAAK,CAACG,eAAe,GAAG,CAAC;IAC3B,CAAC,CAAC,OAAOpB,CAAC,EAAE;MACVc,OAAO,CAACqC,KAAK,CAACnD,CAAC,CAAC;IAClB;EACF,CAAC;AACH;AACA,MAAM8C,WAAW,GAAGsE,yBAAgB,CAACC,SAAS,CAACpG,KAAK,CAAC;AAAC,IAAAqG,QAAA,GAAAC,OAAA,CAAArH,OAAA,GAEvCe,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["_MessageQueue","_interopRequireDefault","require","_reactNative","_KeyboardListener","_DialogListener","_index","e","__esModule","default","previousGlobalErrorHandler","global","ErrorUtils","getGlobalHandler","setGlobalHandler","isFatal","AcousticConnectRN","logExceptionEvent","JSON","stringify","loggingError","console","warn","message","TLTRN","currentScreen","lastJSBridgeMessageTime","totalRenderTime","messageRenderTime","countMsgs","messageConsole","lastMessageConsole","isLoggingData","displayDebug","myTimer","handle","started","time","startTimer","setInterval","checkTime","stopTimer","clearInterval","init","initialCurrentScreen","showDebugConsoleMessages","undefined","currentScreenMsg","MessageQueue","spy","listenToBridge","interceptKeyboardEvents","enable","keyListener","logScreenViewPageName","name","result","setCurrentScreenName","error","log","logScreenViewContextLoad","prevName","USE_CONFIGURED_CAPTURE_DELAY","logScreenLayout","delayMs","logClickEvent","event","target","__nativeTag","_nativeTag","controlId","fiberId","_targetInst","memoizedProps","id","length","Array","isArray","_dispatchInstances","found","find","node","logTextChangeEvent","text","_ariaLabel","Platform","OS","warnedNestedValueSites","Set","WARNED_NESTED_VALUE_SITES_MAX","warnOnNestedValues","api","values","nested","Object","keys","filter","key","value","site","sort","join","has","size","add","logCustomEvent","eventName","level","logDialogShowEvent","dialogId","dialogTitle","dialogType","logDialogDismissEvent","dismissReason","logDialogButtonClickEvent","buttonText","buttonIndex","logDialogCustomEvent","eventListenerRegistered","eventListenerUnsubscribe","interceptDialogEvents","dialogListener","DialogListener","getInstance","startIntercepting","addEventListener","stopIntercepting","now","Date","getTime","from","type","data","module","method","args","logTeal","res","dict","ReactLayoutTime","KeyboardListener","_instance","_default","exports"],"sourceRoot":"../../src","sources":["TLTRN.ts"],"mappings":";;;;;;AAWA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhBxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAQA;AACA;AACA;AACA,MAAMG,0BAA0B,GAAGC,MAAM,CAACC,UAAU,EAAEC,gBAAgB,GAAG,CAAC;;AAE1E;AACAF,MAAM,CAACC,UAAU,EAAEE,gBAAgB,GAAG,CAACP,CAAM,EAAEQ,OAAgB,KAAK;EAClE;EACA;EACA;EACA;EACA;EACA,IAAI;IACFC,cAAiB,EAAEC,iBAAiB,GAChCC,IAAI,CAACC,SAAS,CAACZ,CAAC,CAAC,EACjBW,IAAI,CAACC,SAAS,CAACZ,CAAC,CAAC,EACjB,IACJ,CAAC;E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AC,OAAOpB,CAAC,EAAE;MACVc,OAAO,CAACqC,KAAK,CAACnD,CAAC,CAAC;IAClB;EACF,CAAC;AACH;AACA,MAAM8C,WAAW,GAAGuF,yBAAgB,CAACC,SAAS,CAACrH,KAAK,CAAC;AAAC,IAAAsH,QAAA,GAAAC,OAAA,CAAAtI,OAAA,GAEvCe,KAAK","ignoreList":[]}
@@ -106,13 +106,28 @@ const Connect = ({
106
106
 
107
107
  // Listen for the 'state' event to track navigation state changes
108
108
  const unsubscribeState = navigation.current.addListener("state", () => {
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);
109
+ // extractName resolves the focused route through the nested
110
+ // navigators itself, so there is no outer-level fallback to chain
111
+ // here — one used to be appended, which reported the tab name for
112
+ // every push inside that tab.
113
+ currentRoute.current = extractName(navigation);
114
+
115
+ // Both platforms take the same path. iOS used to be excluded from
116
+ // the layout call, which left the wrapper with no layout trigger
117
+ // at all there: the one remaining bridge caller was TLTRN's
118
+ // render-settle timer, so a plain navigation captured nothing.
119
+ if (!currentRoute.current) {
120
+ return;
115
121
  }
122
+ _TLTRN.default.logScreenViewPageName(currentRoute.current);
123
+ // Deliberately no delay argument. TLTRN then sends its
124
+ // "use the configured CaptureLayoutDelay" sentinel, so the capture
125
+ // is deferred past the transition. Passing 0 would select the
126
+ // native synchronous overload instead, which captures on the
127
+ // calling thread at the *start* of the transition — React
128
+ // Navigation fires 'state' before the animation runs — and makes
129
+ // CaptureLayoutDelay inert.
130
+ _TLTRN.default.logScreenLayout(currentRoute.current);
116
131
  });
117
132
 
118
133
  // Cleanup listeners when the component unmounts or dependencies change
@@ -121,11 +136,9 @@ const Connect = ({
121
136
  };
122
137
  }, [navReady, navigation]);
123
138
  const onStartShouldSetResponderCapture = (0, _react.useCallback)(event => {
124
- if (navigation?.current?.getCurrentRoute) {
125
- currentRoute.current = extractName(navigation) || navigation.current.getCurrentRoute()?.name;
126
- if (currentRoute.current) {
127
- _TLTRN.default.logScreenViewPageName(currentRoute.current);
128
- }
139
+ currentRoute.current = extractName(navigation);
140
+ if (currentRoute.current) {
141
+ _TLTRN.default.logScreenViewPageName(currentRoute.current);
129
142
  }
130
143
  _TLTRN.default.logClickEvent(event);
131
144
  return false; // Must remain false so events bubble to the host app's handlers
@@ -135,13 +148,19 @@ const Connect = ({
135
148
  return false;
136
149
  }
137
150
  initial.current = true;
138
- if (navigation?.current?.getCurrentRoute) {
139
- currentRoute.current = navigation.current.getCurrentRoute()?.name;
140
- if (_reactNative.Platform.OS === "ios" && currentRoute.current) {
141
- _TLTRN.default.logScreenViewPageName(currentRoute.current);
142
- } else if (_reactNative.Platform.OS === "android") {
143
- _TLTRN.default.logScreenLayout(currentRoute.current);
144
- }
151
+
152
+ // Resolved through extractName like the other two triggers. This site
153
+ // used to read `getCurrentRoute()?.name` directly, so a `params.name`
154
+ // override was honoured on navigation but silently ignored for the
155
+ // first-paint screen — the same screen reported under two names.
156
+ currentRoute.current = extractName(navigation);
157
+ // Same unification as the 'state' listener above: the split sent
158
+ // only a screenview on iOS and only a layout on Android, so
159
+ // neither platform got both from the first-paint trigger. No delay
160
+ // argument, for the reason given there.
161
+ if (currentRoute.current) {
162
+ _TLTRN.default.logScreenViewPageName(currentRoute.current);
163
+ _TLTRN.default.logScreenLayout(currentRoute.current);
145
164
  }
146
165
  return true;
147
166
  }, [navigation]);
@@ -154,15 +173,115 @@ const Connect = ({
154
173
  }) : children
155
174
  });
156
175
  };
176
+
177
+ /**
178
+ * Walks a React Navigation state down to the deepest **focused** route.
179
+ *
180
+ * Nested navigators are the default architecture of production RN apps: a tab
181
+ * navigator whose tabs each hold a stack. The container's root state then
182
+ * describes only the outer level, and the route that the user is actually
183
+ * looking at lives in `routes[index].state`, recursively. Reading the outer
184
+ * level alone reports the *tab* name for every push inside that tab, so screen
185
+ * changes below the first level are invisible to analytics and replay.
186
+ *
187
+ * `index` can legitimately be absent on a partial/rehydrated state, in which
188
+ * case React Navigation treats the last route as focused — matched here.
189
+ *
190
+ * A depth cap guards against a malformed state whose nesting cycles; 32 is far
191
+ * past any real navigator tree.
192
+ */
193
+ function findFocusedRoute(state) {
194
+ let current = state;
195
+ let depth = 0;
196
+ while (current?.routes?.length && depth++ < 32) {
197
+ const index = current.index ?? current.routes.length - 1;
198
+ const route = current.routes[index];
199
+ if (!route?.state?.routes?.length) {
200
+ return route;
201
+ }
202
+ current = route.state;
203
+ }
204
+ return undefined;
205
+ }
206
+
207
+ /**
208
+ * Containers already reported by {@link warnExtractNameFailed}.
209
+ *
210
+ * Keyed by the container itself, so a ref that throws on every navigation
211
+ * produces one line rather than one per transition, while a genuinely
212
+ * different container still gets its own. A `WeakSet` holds no strong
213
+ * reference, so remembering a container cannot keep it alive.
214
+ */
215
+ const extractNameErrorReported = new WeakSet();
216
+
217
+ /**
218
+ * Reports, once per container, that resolving the current route threw.
219
+ *
220
+ * A throw here is expected and harmless during teardown, which is why
221
+ * ``extractName`` swallows it. A ref that keeps throwing is a different
222
+ * matter: every screen view goes unnamed, and without a line here that looks
223
+ * exactly like a ref that never attached. One warning separates the two
224
+ * without flooding a listener that fires per navigation.
225
+ */
226
+ function warnExtractNameFailed(container, error) {
227
+ if (typeof container === "object" && container !== null) {
228
+ if (extractNameErrorReported.has(container)) {
229
+ return;
230
+ }
231
+ extractNameErrorReported.add(container);
232
+ }
233
+ console.warn("Connect: could not resolve the current route — the navigation container ref threw. " + "Screen views stay unnamed while this persists (harmless if the container is unmounting). " + "Cause:", error);
234
+ }
235
+
236
+ /**
237
+ * The screen name to report for the navigation container's current position.
238
+ *
239
+ * Resolution order:
240
+ *
241
+ * 1. The focused route resolved from `getRootState()` by ``findFocusedRoute``.
242
+ * Taking the state and walking it here — rather than trusting a single
243
+ * accessor — keeps the wrapper correct regardless of whether the host app's
244
+ * navigation library resolves nesting inside `getCurrentRoute()`, and works
245
+ * for a custom container ref that exposes state but not that helper.
246
+ * 2. `getCurrentRoute()`, for refs that expose no `getRootState`.
247
+ *
248
+ * Either way `params.name` wins over the route's own `name` when the host app
249
+ * supplies it — the documented override for giving a route a human-readable
250
+ * analytics name. Only a non-empty string counts, so `params: { name: '' }`
251
+ * falls through to the route name instead of blanking the screenview.
252
+ *
253
+ * Returns `""` when nothing resolves, which both callers treat as "skip".
254
+ */
157
255
  function extractName(navigation) {
158
- const routeParams = navigation?.current?.getCurrentRoute?.()?.params;
159
- if (routeParams) {
160
- const {
161
- name
162
- } = routeParams;
163
- return name ? name : navigation.current?.getCurrentRoute()?.name || "";
256
+ const container = navigation?.current;
257
+ if (!container) {
258
+ return "";
259
+ }
260
+ let route;
261
+ try {
262
+ route = findFocusedRoute(container.getRootState?.());
263
+ } catch (error) {
264
+ // A container mid-teardown can throw out of getRootState(). Screen
265
+ // naming is not worth taking the host app's navigation down for.
266
+ warnExtractNameFailed(container, error);
267
+ route = undefined;
268
+ }
269
+ if (!route) {
270
+ try {
271
+ route = container.getCurrentRoute?.();
272
+ } catch (error) {
273
+ warnExtractNameFailed(container, error);
274
+ route = undefined;
275
+ }
276
+ }
277
+ if (!route) {
278
+ return "";
279
+ }
280
+ const overridden = route.params?.name;
281
+ if (typeof overridden === "string" && overridden.length > 0) {
282
+ return overridden;
164
283
  }
165
- return "";
284
+ return typeof route.name === "string" ? route.name : "";
166
285
  }
167
286
  var _default = exports.default = Connect;
168
287
  const styles = _reactNative.StyleSheet.create({
@@ -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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,OAAOjB,IAAI,GAAGA,IAAI,GAAG7B,UAAU,CAACe,OAAO,EAAEE,eAAe,CAAC,CAAC,EAAEY,IAAI,IAAI,EAAE;EAC1E;EACA,OAAO,EAAE;AACb;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAA7E,OAAA,GAEciB,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","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","useCallback","event","logClickEvent","onLayout","_event","jsx","View","style","styles","connect_main","cloneElement","findFocusedRoute","state","depth","routes","length","index","route","extractNameErrorReported","WeakSet","warnExtractNameFailed","container","error","add","getRootState","overridden","params","name","_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,GAAA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