react-native-acoustic-connect-beta 19.1.15 → 19.1.17
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/AcousticConnectRN.podspec +1 -0
- package/CHANGELOG.md +18 -0
- package/android/src/main/assets/ConnectBasicConfig.properties +1 -1
- package/android/src/main/java/com/acousticconnectrn/HybridAcousticConnectRN.kt +56 -7
- package/ios/ConnectRNExceptionPayload.swift +38 -0
- package/ios/HybridAcousticConnectRN.swift +3 -7
- package/package.json +1 -1
|
@@ -157,6 +157,7 @@ Pod::Spec.new do |s|
|
|
|
157
157
|
'ios/Tests/**/*.swift',
|
|
158
158
|
'ios/ConnectRNParsing.swift',
|
|
159
159
|
'ios/ConnectRNScreenResolution.swift',
|
|
160
|
+
'ios/ConnectRNExceptionPayload.swift',
|
|
160
161
|
'nitrogen/generated/ios/swift/Variant_Bool_String_Double.swift',
|
|
161
162
|
]
|
|
162
163
|
# ios/ConnectRNParsing.swift does `import Connect`. CocoaPods test_specs
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 19.1.17 (2026-10-28)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* CA-159219 only count an active PodSpecs source line ([#134](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/issues/134)) ([9f28890](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/commit/9f2889027e318f01d08f56723ac0ff6d0049f00b)), closes [cordova-acoustic-connect#64](https://github.com/aipoweredmarketer/cordova-acoustic-connect/issues/64) [#123](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/issues/123)
|
|
6
|
+
|
|
7
|
+
### Reverts
|
|
8
|
+
|
|
9
|
+
* Revert "Beta ReactNativeConnect build: 18.0.36" ([609ad7d](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/commit/609ad7d3244ec06f27dced5864d40585c5b3c9cf))
|
|
10
|
+
## 19.1.16 (2026-10-27)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* CA-159219 only count an active PodSpecs source line ([#134](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/issues/134)) ([9f28890](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/commit/9f2889027e318f01d08f56723ac0ff6d0049f00b)), closes [cordova-acoustic-connect#64](https://github.com/aipoweredmarketer/cordova-acoustic-connect/issues/64) [#123](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/issues/123)
|
|
15
|
+
|
|
16
|
+
### Reverts
|
|
17
|
+
|
|
18
|
+
* Revert "Beta ReactNativeConnect build: 18.0.36" ([609ad7d](https://github.com/aipoweredmarketer/react-native-acoustic-connect-beta/commit/609ad7d3244ec06f27dced5864d40585c5b3c9cf))
|
|
1
19
|
## 19.1.15 (2026-10-26)
|
|
2
20
|
|
|
3
21
|
### Bug Fixes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
1
|
+
// Copyright (C) 2025, 2026 Acoustic, L.P. All rights reserved.
|
|
2
2
|
//
|
|
3
3
|
// NOTICE: This file contains material that is confidential and proprietary to
|
|
4
4
|
// Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
|
|
@@ -277,6 +277,7 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
|
|
|
277
277
|
*/
|
|
278
278
|
override fun disable(): Boolean {
|
|
279
279
|
Log.i(TAG, "[bridge] disable() called from JS")
|
|
280
|
+
forgetRoute()
|
|
280
281
|
runOnMain {
|
|
281
282
|
Connect.disable()
|
|
282
283
|
Log.i(TAG, "[bridge] SDK disabled")
|
|
@@ -933,6 +934,11 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
|
|
|
933
934
|
*/
|
|
934
935
|
private fun isCaptureAllowed(): Boolean = Connect.isEnabled()
|
|
935
936
|
|
|
937
|
+
// The route `<Connect>` last navigated to, so the bridge can post its
|
|
938
|
+
// UNLOAD when the next one is entered.
|
|
939
|
+
private val routeLock = Any()
|
|
940
|
+
private var currentRoute: String? = null
|
|
941
|
+
|
|
936
942
|
/**
|
|
937
943
|
* Requests that the framework save the current application page name.
|
|
938
944
|
*
|
|
@@ -1004,7 +1010,10 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
|
|
|
1004
1010
|
// into a crash; the sample now calls this method directly, so the path is
|
|
1005
1011
|
// easy to reach from JS.
|
|
1006
1012
|
val activity = getCurrentActivity() ?: return false
|
|
1007
|
-
|
|
1013
|
+
// A null name is refused, as on iOS. It used to be stringified, so a
|
|
1014
|
+
// screen named "null" reached analytics (CA-161120).
|
|
1015
|
+
val pageName = logicalPageName?.asSecondOrNull() ?: return false
|
|
1016
|
+
return logScreenview(activity, pageName, ConnectScreenviewType.LOAD, referrer?.asSecondOrNull())
|
|
1008
1017
|
}
|
|
1009
1018
|
|
|
1010
1019
|
/**
|
|
@@ -1022,7 +1031,10 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
|
|
|
1022
1031
|
// into a crash; the sample now calls this method directly, so the path is
|
|
1023
1032
|
// easy to reach from JS.
|
|
1024
1033
|
val activity = getCurrentActivity() ?: return false
|
|
1025
|
-
|
|
1034
|
+
// A null name is refused, as on iOS. It used to be stringified, so a
|
|
1035
|
+
// screen named "null" reached analytics (CA-161120).
|
|
1036
|
+
val pageName = logicalPageName?.asSecondOrNull() ?: return false
|
|
1037
|
+
return logScreenview(activity, pageName, ConnectScreenviewType.UNLOAD, referrer?.asSecondOrNull())
|
|
1026
1038
|
}
|
|
1027
1039
|
|
|
1028
1040
|
/**
|
|
@@ -1048,10 +1060,7 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
|
|
|
1048
1060
|
// which is not a reason to skip the screenview and layout that follow — they
|
|
1049
1061
|
// are what the caller asked for. Treating it as fatal would suppress capture
|
|
1050
1062
|
// in cases that capture fine today.
|
|
1051
|
-
|
|
1052
|
-
// The 3-arg overload takes a nullable Activity, so this one is safe to pass
|
|
1053
|
-
// through — unlike the 4-arg overload the context methods use.
|
|
1054
|
-
logScreenview(getCurrentActivity(), name, ConnectScreenviewType.LOAD)
|
|
1063
|
+
logRouteScreenviews(getCurrentActivity(), name)
|
|
1055
1064
|
var result = false
|
|
1056
1065
|
// The layout capture below needs a real activity: it used to go through
|
|
1057
1066
|
// Objects.requireNonNull, which threw when the activity had gone away
|
|
@@ -1069,6 +1078,46 @@ class HybridAcousticConnectRN : HybridAcousticConnectRNSpec(),
|
|
|
1069
1078
|
return result
|
|
1070
1079
|
}
|
|
1071
1080
|
|
|
1081
|
+
/**
|
|
1082
|
+
* Resumes capture for [name], first posting an UNLOAD of the route left
|
|
1083
|
+
* when [name] is a different route (CA-161120). Nothing else here is the
|
|
1084
|
+
* bridge's: the LOAD and its referrer stay the SDK's.
|
|
1085
|
+
*
|
|
1086
|
+
* The UNLOAD names the route left as its own referrer, as iOS does. That
|
|
1087
|
+
* also makes the SDK name it as the referrer of the LOAD `resumeConnect`
|
|
1088
|
+
* posts next: the SDK takes a missing referrer from the last referrer it
|
|
1089
|
+
* was given (`Logger.logScreenview`), and an UNLOAD sets that even when the
|
|
1090
|
+
* queue refuses it. Before, the last referrer was whatever the app last
|
|
1091
|
+
* passed to `logScreenViewContextLoad`, so every route carried it. Connect
|
|
1092
|
+
* Android SDKs with the native fix name the screen on display instead,
|
|
1093
|
+
* which is the same route.
|
|
1094
|
+
*
|
|
1095
|
+
* Only routes count: a direct screen view is the app's own call. With no
|
|
1096
|
+
* activity no UNLOAD can be posted (the four-argument overload needs one),
|
|
1097
|
+
* but the route is still recorded.
|
|
1098
|
+
*/
|
|
1099
|
+
private fun logRouteScreenviews(activity: Activity?, name: String) {
|
|
1100
|
+
val left: String?
|
|
1101
|
+
synchronized(routeLock) {
|
|
1102
|
+
left = currentRoute.takeIf { it != name }
|
|
1103
|
+
currentRoute = name
|
|
1104
|
+
}
|
|
1105
|
+
if (activity != null && left != null) {
|
|
1106
|
+
logScreenview(activity, left, ConnectScreenviewType.UNLOAD, left)
|
|
1107
|
+
}
|
|
1108
|
+
resumeConnect(activity, name, false)
|
|
1109
|
+
// The 3-arg overload takes a nullable Activity, so this one is safe to pass
|
|
1110
|
+
// through — unlike the 4-arg overload the context methods use.
|
|
1111
|
+
logScreenview(activity, name, ConnectScreenviewType.LOAD)
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/** Forgets the route, so nothing navigated before a `disable()` is unloaded after it. */
|
|
1115
|
+
private fun forgetRoute() {
|
|
1116
|
+
synchronized(routeLock) {
|
|
1117
|
+
currentRoute = null
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1072
1121
|
/**
|
|
1073
1122
|
* Captures the layout of [activity] as an *automatic* capture — the kind
|
|
1074
1123
|
* the wrapper triggers itself, on navigation or behind a dialog — rather
|
|
@@ -0,0 +1,38 @@
|
|
|
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 Foundation
|
|
12
|
+
|
|
13
|
+
/// What `logExceptionEvent` hands the SDK for a JavaScript error.
|
|
14
|
+
///
|
|
15
|
+
/// Kept apart from `HybridAcousticConnectRN` and free of any SDK import so the
|
|
16
|
+
/// UnitTests test_spec can compile it directly (see the podspec).
|
|
17
|
+
enum ConnectRNExceptionPayload {
|
|
18
|
+
|
|
19
|
+
/// The exception name every JavaScript error is reported under; Android's
|
|
20
|
+
/// bridge posts the same one.
|
|
21
|
+
static let exceptionName = "React Plugin"
|
|
22
|
+
|
|
23
|
+
/// Builds the arguments for `logNSExceptionEvent:dataDictionary:isUnhandled:`.
|
|
24
|
+
///
|
|
25
|
+
/// The exception must not be nil: the SDK reads `name` and `description`
|
|
26
|
+
/// off it, and with none it posts only `unhandled` (CA-161116). It is never
|
|
27
|
+
/// raised, so it has no call stack of its own; the JavaScript stack travels
|
|
28
|
+
/// in `data` as `stacktrace`.
|
|
29
|
+
static func make(message: String, stackInfo: String) -> (exception: NSException, data: [String: Any]) {
|
|
30
|
+
let data: [String: Any] = [
|
|
31
|
+
"type": exceptionName,
|
|
32
|
+
"message": message,
|
|
33
|
+
"stacktrace": stackInfo,
|
|
34
|
+
]
|
|
35
|
+
let exception = NSException(name: NSExceptionName(exceptionName), reason: message, userInfo: nil)
|
|
36
|
+
return (exception, data)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
1
|
+
// Copyright (C) 2025, 2026 Acoustic, L.P. All rights reserved.
|
|
2
2
|
//
|
|
3
3
|
// NOTICE: This file contains material that is confidential and proprietary to
|
|
4
4
|
// Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
|
|
@@ -720,12 +720,8 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
|
|
|
720
720
|
/// - unhandled: Whether exception is unhandled.
|
|
721
721
|
/// - Returns: Boolean value will return whether it was able to log the exception event.
|
|
722
722
|
func logExceptionEvent(message: String, stackInfo: String, unhandled: Bool) throws -> Bool {
|
|
723
|
-
let
|
|
724
|
-
|
|
725
|
-
"message": message,
|
|
726
|
-
"stacktrace": stackInfo
|
|
727
|
-
]
|
|
728
|
-
let result = ConnectCustomEvent().logNSExceptionEvent(nil, dataDictionary: exceptionDict, isUnhandled: unhandled)
|
|
723
|
+
let payload = ConnectRNExceptionPayload.make(message: message, stackInfo: stackInfo)
|
|
724
|
+
let result = ConnectCustomEvent().logNSExceptionEvent(payload.exception, dataDictionary: payload.data, isUnhandled: unhandled)
|
|
729
725
|
return result
|
|
730
726
|
}
|
|
731
727
|
|
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.17",
|
|
232
232
|
"workspaces": [
|
|
233
233
|
"example",
|
|
234
234
|
"Examples/bare-workflow"
|