react-native-acoustic-connect-beta 19.1.5 → 19.1.6
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.
|
@@ -148,6 +148,7 @@ Pod::Spec.new do |s|
|
|
|
148
148
|
ts.source_files = [
|
|
149
149
|
'ios/Tests/**/*.swift',
|
|
150
150
|
'ios/ConnectRNParsing.swift',
|
|
151
|
+
'ios/ConnectRNScreenResolution.swift',
|
|
151
152
|
'nitrogen/generated/ios/swift/Variant_Bool_String_Double.swift',
|
|
152
153
|
]
|
|
153
154
|
# ios/ConnectRNParsing.swift does `import Connect`. CocoaPods test_specs
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 19.1.6 (2026-10-01)
|
|
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.1.5 (2026-10-01)
|
|
2
7
|
|
|
3
8
|
### Reverts
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright (C) 2026 Acoustic, L.P. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// NOTICE: This file contains material that is confidential and proprietary to
|
|
5
|
+
// Acoustic, L.P. and/or other developers. No license is granted under any
|
|
6
|
+
// intellectual or industrial property rights of Acoustic, L.P. except as may
|
|
7
|
+
// be provided in an agreement with Acoustic, L.P. Any unauthorized copying or
|
|
8
|
+
// distribution of content from this file is prohibited.
|
|
9
|
+
//
|
|
10
|
+
|
|
11
|
+
import UIKit
|
|
12
|
+
|
|
13
|
+
/// Walks from a window's root view controller down to the screen a layout
|
|
14
|
+
/// capture should describe.
|
|
15
|
+
///
|
|
16
|
+
/// Split out of `HybridAcousticConnectRN` so the walk can be unit-tested
|
|
17
|
+
/// without a window, and compiled into the UnitTests bundle (see the
|
|
18
|
+
/// podspec's test_spec for why the pod module itself cannot be imported).
|
|
19
|
+
///
|
|
20
|
+
/// Must be called on the main thread.
|
|
21
|
+
enum ConnectRNScreenResolution {
|
|
22
|
+
|
|
23
|
+
/// The view controller that is actually showing under `root`.
|
|
24
|
+
///
|
|
25
|
+
/// Walks the `presentedViewController` chain, unwraps navigation and tab
|
|
26
|
+
/// controllers to the child on screen, and descends into
|
|
27
|
+
/// react-native-screens' controllers (see `activeScreen(in:)`).
|
|
28
|
+
///
|
|
29
|
+
/// The react-native-screens step is what makes a capture name the same
|
|
30
|
+
/// controller the SDK records for the screen. Those controllers are plain
|
|
31
|
+
/// child view controllers of React Native's root, not navigation or tab
|
|
32
|
+
/// containers, so without it the walk stopped at the root. The SDK, which
|
|
33
|
+
/// records the `RNSScreen` from its `viewDidAppear`, then saw a capture of
|
|
34
|
+
/// some other controller and posted a second LOAD for a screen already on
|
|
35
|
+
/// display, naming itself as its referrer.
|
|
36
|
+
///
|
|
37
|
+
/// - Parameter root: The window's root view controller.
|
|
38
|
+
/// - Returns: The view controller to capture, or `nil` when `root` is nil.
|
|
39
|
+
static func topViewController(from root: UIViewController?) -> UIViewController? {
|
|
40
|
+
var top = root
|
|
41
|
+
// Bounded rather than an open `while`. In practice the chain is a short
|
|
42
|
+
// linked list, but this runs on every navigation, so a pathological
|
|
43
|
+
// cycle must not hang the main thread.
|
|
44
|
+
var hops = 0
|
|
45
|
+
while hops < 32, let current = top {
|
|
46
|
+
hops += 1
|
|
47
|
+
// Presentation first: `presentedViewController` also reports a
|
|
48
|
+
// modal put up by a descendant, so checking it before unwrapping a
|
|
49
|
+
// container lands on the modal directly instead of on the
|
|
50
|
+
// container's child underneath it.
|
|
51
|
+
if let presented = current.presentedViewController {
|
|
52
|
+
top = presented
|
|
53
|
+
continue
|
|
54
|
+
}
|
|
55
|
+
if let nav = current as? UINavigationController,
|
|
56
|
+
let visible = nav.topViewController {
|
|
57
|
+
top = visible
|
|
58
|
+
continue
|
|
59
|
+
}
|
|
60
|
+
if let tabs = current as? UITabBarController,
|
|
61
|
+
let selected = tabs.selectedViewController {
|
|
62
|
+
top = selected
|
|
63
|
+
continue
|
|
64
|
+
}
|
|
65
|
+
if let screen = activeScreen(in: current) {
|
|
66
|
+
top = screen
|
|
67
|
+
continue
|
|
68
|
+
}
|
|
69
|
+
break
|
|
70
|
+
}
|
|
71
|
+
return top
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/// The react-native-screens child of `viewController` that is showing, if
|
|
75
|
+
/// it has one.
|
|
76
|
+
///
|
|
77
|
+
/// - A screen container (`RNSViewController`) is asked through its own
|
|
78
|
+
/// `findActiveChildVC`, which react-native-screens also uses to route
|
|
79
|
+
/// status-bar and orientation queries to the screen on top; during a
|
|
80
|
+
/// transition several screens are attached and only it knows which one.
|
|
81
|
+
/// - Anything else descends into its last visible react-native-screens
|
|
82
|
+
/// child: React Native's root holds the container that way, and a
|
|
83
|
+
/// screen holds a nested native stack (`RNSNavigationController`) that way.
|
|
84
|
+
///
|
|
85
|
+
/// Only react-native-screens controllers are descended into, recognised by
|
|
86
|
+
/// the class-name prefix the SDK itself matches on (`isRNSScreen:`), so an
|
|
87
|
+
/// app that embeds React Native next to its own child controllers keeps
|
|
88
|
+
/// the controller it had before.
|
|
89
|
+
///
|
|
90
|
+
/// - Parameter viewController: The controller the walk has reached.
|
|
91
|
+
/// - Returns: The child to continue from, or `nil` to stop at `viewController`.
|
|
92
|
+
static func activeScreen(in viewController: UIViewController) -> UIViewController? {
|
|
93
|
+
if isScreensController(viewController), let active = findActiveChild(of: viewController) {
|
|
94
|
+
return active
|
|
95
|
+
}
|
|
96
|
+
return viewController.children.last { child in
|
|
97
|
+
isScreensController(child) && child.viewIfLoaded?.isHidden != true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/// Whether `viewController` belongs to react-native-screens.
|
|
102
|
+
static func isScreensController(_ viewController: UIViewController) -> Bool {
|
|
103
|
+
NSStringFromClass(type(of: viewController)).hasPrefix("RNS")
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
private static let findActiveChildSelector = NSSelectorFromString("findActiveChildVC")
|
|
107
|
+
|
|
108
|
+
private static func findActiveChild(of container: UIViewController) -> UIViewController? {
|
|
109
|
+
guard container.responds(to: findActiveChildSelector),
|
|
110
|
+
let active = container.perform(findActiveChildSelector)?.takeUnretainedValue() as? UIViewController,
|
|
111
|
+
active.parent === container else {
|
|
112
|
+
return nil
|
|
113
|
+
}
|
|
114
|
+
return active
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -790,6 +790,11 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
|
|
|
790
790
|
/// The framework only unwraps navigation controllers; capturing a tab
|
|
791
791
|
/// controller is not wrong (its view contains the selected child), but
|
|
792
792
|
/// the selected child is the screen the capture is named after.
|
|
793
|
+
/// - It descends into react-native-screens' controllers to the screen on
|
|
794
|
+
/// top (`ConnectRNScreenResolution`). The framework records that
|
|
795
|
+
/// `RNSScreen` as the current screen, and only a capture of the same
|
|
796
|
+
/// controller adds a layout to its screen view instead of posting a
|
|
797
|
+
/// second, self-referencing LOAD.
|
|
793
798
|
///
|
|
794
799
|
/// Must be called on the main thread — see `captureScreenLayout`.
|
|
795
800
|
private static func resolveTopViewController() -> UIViewController? {
|
|
@@ -810,34 +815,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
|
|
|
810
815
|
return nil
|
|
811
816
|
}
|
|
812
817
|
|
|
813
|
-
|
|
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
|
|
818
|
+
return ConnectRNScreenResolution.topViewController(from: window.rootViewController)
|
|
841
819
|
}
|
|
842
820
|
|
|
843
821
|
/// Resolves the top view controller and hands it to the framework, as one
|
package/package.json
CHANGED
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
"source": "src/index",
|
|
229
229
|
"summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
|
|
230
230
|
"types": "./lib/typescript/src/index.d.ts",
|
|
231
|
-
"version": "19.1.
|
|
231
|
+
"version": "19.1.6",
|
|
232
232
|
"workspaces": [
|
|
233
233
|
"example",
|
|
234
234
|
"Examples/bare-workflow"
|