react-native-acoustic-connect-beta 18.0.19 → 18.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.
@@ -85,6 +85,71 @@ def updateTealeafBasicConfig(mp, json) {
85
85
  println("Updating:$propertiesFile")
86
86
  }
87
87
 
88
+ def updateConnectBasicConfig(mp, json) {
89
+ def propertiesFile = "$mp/src/main/assets/ConnectBasicConfig.properties"
90
+ FileInputStream _file = new FileInputStream(propertiesFile);
91
+ Properties properties = new Properties();
92
+ properties.load(_file);
93
+ _file.close();
94
+
95
+ FileOutputStream out = new FileOutputStream(propertiesFile);
96
+
97
+ json.each { key, value ->
98
+ if(key != "Connect"){ return }
99
+
100
+ println("Update/Add the following key/values:")
101
+ value.each { config_key, config_value ->
102
+ if(config_value.getClass() != java.lang.String
103
+ && config_value.getClass() != java.lang.Boolean
104
+ && config_value.getClass() != java.lang.Integer){
105
+ return
106
+ }
107
+ // Just update the following items
108
+ if (config_key == "AppKey" ||
109
+ config_key == "PostMessageUrl" ||
110
+ config_key == "KillSwitchUrl" ||
111
+ config_key == "KillSwitchEnabled" ||
112
+ config_key == "KillSwitchMaxNumberOfTries" ||
113
+ config_key == "KillSwitchTimeInterval" ||
114
+ config_key == "UseWhiteList" ||
115
+ config_key == "WhiteListParam" ||
116
+ config_key == "UseRandomSample" ||
117
+ config_key == "RandomSampleParam" ||
118
+ config_key == "PrintScreen" ||
119
+ config_key == "Connection" ||
120
+ config_key == "MaxStringsLength" ||
121
+ config_key == "CookieUrl" ||
122
+ config_key == "CookieParam" ||
123
+ config_key == "CookiePath" ||
124
+ config_key == "CookieDomain" ||
125
+ config_key == "CookieExpires" ||
126
+ config_key == "CookieSecure" ||
127
+ config_key == "CookieExpiresFormat" ||
128
+ config_key == "SessionTimeout" ||
129
+ config_key == "SessionTimeoutKillSwitch" ||
130
+ config_key == "disableTLTDID" ||
131
+ config_key == "ScreenshotFormat" ||
132
+ config_key == "PercentOfScreenshotsSize" ||
133
+ config_key == "PercentToCompressImage" ||
134
+ config_key == "ScreenShotPixelDensity" ||
135
+ config_key == "LogViewLayoutOnScreenTransition" ||
136
+ config_key == "GetImageDataOnScreenLayout" ||
137
+ config_key == "SetGestureDetector" ||
138
+ config_key == "CaptureNativeGesturesOnWebview" ||
139
+ config_key == "LogLocationEnabled" ||
140
+ config_key == "LogLocationTries" ||
141
+ config_key == "LogLocationTimeout" ) {
142
+ println(config_key + "=" + config_value)
143
+ properties.setProperty(config_key, config_value.toString())
144
+ }
145
+ }
146
+ }
147
+
148
+ properties.store(out, null);
149
+ out.close();
150
+ println("Updating:$propertiesFile")
151
+ }
152
+
88
153
  def updateLayoutConfig(mp, json){
89
154
  def layoutConfigPath = "$mp/src/main/assets/TealeafLayoutConfig.json"
90
155
  def layoutConfigDefaultPath = "$mp/src/main/assets/TealeafLayoutConfigDefault.json"
@@ -299,14 +364,16 @@ try {
299
364
  println("Step 2:")
300
365
  updateTealeafBasicConfig(module_path, configJSONData)
301
366
  println("Step 3:")
302
- updateLayoutConfig(module_path, configJSONData)
367
+ updateConnectBasicConfig(module_path, configJSONData)
303
368
  println("Step 4:")
304
- updateTealeafAdvConfig(module_path, configJSONData)
369
+ updateLayoutConfig(module_path, configJSONData)
305
370
  println("Step 5:")
306
- updateEOCoreBasicConfig(module_path, configJSONData)
371
+ updateTealeafAdvConfig(module_path, configJSONData)
307
372
  println("Step 6:")
308
- updateEOCoreAdvConfig(module_path, configJSONData)
373
+ updateEOCoreBasicConfig(module_path, configJSONData)
309
374
  println("Step 7:")
375
+ updateEOCoreAdvConfig(module_path, configJSONData)
376
+ println("Step 8:")
310
377
  updateGradle(module_path, configJSONData)
311
378
  println("*********************************************************************************************")
312
379
  } catch (FileNotFoundException e) {
@@ -24,7 +24,7 @@
24
24
  "IpPlaceholder": "N/A",
25
25
  "KillSwitchAsync": true,
26
26
  "KillSwitchDelay": 300,
27
- "LibraryVersion": "11.0.7-beta",
27
+ "LibraryVersion": "11.0.8-beta",
28
28
  "LogFullRequestResponsePayloads": true,
29
29
  "MessageTypeHeader": "WorklightHit",
30
30
  "MessageTypes": "4,5",
@@ -0,0 +1,35 @@
1
+ #Fri Apr 24 00:36:32 PDT 2026
2
+ UseWhiteList=true
3
+ PrintScreen=3
4
+ UseRandomSample=false
5
+ CookieDomain=.straussandplesser.com
6
+ PostMessageUrl=https\://lib-us-2.brilliantcollector.com/collector/collectorPost
7
+ SessionTimeout=30
8
+ PercentToCompressImage=80
9
+ CookieExpires=false
10
+ AppKey=b6c3709b7a4c479bb4b5a9fb8fec324c
11
+ KillSwitchEnabled=false
12
+ ScreenShotPixelDensity=1.5
13
+ CookieExpiresFormat=ASCTIME
14
+ RandomSampleParam=
15
+ SessionTimeoutKillSwitch=false
16
+ PercentOfScreenshotsSize=40
17
+ SetGestureDetector=true
18
+ disableTLTDID=false
19
+ GetImageDataOnScreenLayout=false
20
+ CookieUrl=http\://m.straussandplesser.com
21
+ ScreenshotFormat=JPG
22
+ Connection=3
23
+ CookiePath=/
24
+ KillSwitchUrl=https\://lib-us-2.brilliantcollector.com/collector/switch/b6c3709b7a4c479bb4b5a9fb8fec324c
25
+ LogLocationEnabled=true
26
+ LogLocationTimeout=30
27
+ KillSwitchTimeInterval=5
28
+ MaxStringsLength=300
29
+ CookieParam=TLTSID
30
+ CookieSecure=true
31
+ LogViewLayoutOnScreenTransition=true
32
+ KillSwitchMaxNumberOfTries=3
33
+ WhiteListParam=id
34
+ CaptureNativeGesturesOnWebview=false
35
+ LogLocationTries=3
@@ -24,7 +24,7 @@
24
24
  "IpPlaceholder": "N/A",
25
25
  "KillSwitchAsync": true,
26
26
  "KillSwitchDelay": 300,
27
- "LibraryVersion": "10.4.26-beta",
27
+ "LibraryVersion": "10.4.27-beta",
28
28
  "LogFullRequestResponsePayloads": true,
29
29
  "MessageTypeHeader": "WorklightHit",
30
30
  "MessageTypes": "4,5",
@@ -12,9 +12,68 @@
12
12
 
13
13
  import Foundation
14
14
  import Connect
15
+ import NitroModules
16
+
17
+ // EOCore and Tealeaf ship as separate modules in the Release iOS SDK and in the
18
+ // Debug SDK before 2.1.2. From Debug 2.1.2 onward they are merged into Connect
19
+ // and these modules are no longer on the search path — so we import them
20
+ // conditionally to support both variants from the same source.
21
+ #if canImport(EOCore)
15
22
  import EOCore
23
+ #endif
24
+ #if canImport(Tealeaf)
16
25
  import Tealeaf
17
- import NitroModules
26
+ #endif
27
+
28
+ // In the unified SDK, module-name constants were dropped along with the modules
29
+ // themselves. The replacement helper (`ConnectApplicationHelper`) ignores the
30
+ // module name — a single config store holds all keys. We still keep the old
31
+ // names so existing call sites compile unchanged on both variants.
32
+ #if !canImport(EOCore)
33
+ private let kEOCoreModule = "EOCore"
34
+ private let kTLFCoreModule = "TLFCoreModule"
35
+ #endif
36
+
37
+ // Cross-SDK bridge for the config-item set/get API. On the old SDK this calls
38
+ // through `EOApplicationHelper` with a module name; on the unified SDK it calls
39
+ // through `ConnectApplicationHelper` and the module name is ignored.
40
+ private enum ConnectConfigStore {
41
+ @discardableResult
42
+ static func set(_ key: String, value: Any, forModule moduleName: String) -> Bool {
43
+ #if canImport(EOCore)
44
+ return EOApplicationHelper.sharedInstance().setConfigItem(key, value: value, forModuleName: moduleName)
45
+ #else
46
+ return ConnectApplicationHelper.sharedInstance().setConfigurableItem(key, value: value)
47
+ #endif
48
+ }
49
+
50
+ static func bool(forKey key: String, default def: Bool, moduleName: String) -> Bool {
51
+ #if canImport(EOCore)
52
+ return EOApplicationHelper().getBOOLconfigItem(forKey: key, withDefault: def, forModuleName: moduleName)
53
+ #else
54
+ let raw = ConnectApplicationHelper.sharedInstance().value(forConfigurableItem: key)
55
+ if let n = raw as? NSNumber { return n.boolValue }
56
+ if let s = raw as? String { return (s as NSString).boolValue }
57
+ return def
58
+ #endif
59
+ }
60
+
61
+ static func string(forKey key: String, default def: String, moduleName: String) -> String? {
62
+ #if canImport(EOCore)
63
+ return EOApplicationHelper().getStringItem(forKey: key, withDefault: def, forModuleName: moduleName)
64
+ #else
65
+ return (ConnectApplicationHelper.sharedInstance().value(forConfigurableItem: key) as? String) ?? def
66
+ #endif
67
+ }
68
+
69
+ static func number(forKey key: String, default def: Double, moduleName: String) -> Double {
70
+ #if canImport(EOCore)
71
+ return (EOApplicationHelper().getNumberItem(forKey: key, withDefault: NSNumber(value: def), forModuleName: moduleName) as? NSNumber)?.doubleValue ?? def
72
+ #else
73
+ return (ConnectApplicationHelper.sharedInstance().value(forConfigurableItem: key) as? NSNumber)?.doubleValue ?? def
74
+ #endif
75
+ }
76
+ }
18
77
 
19
78
  class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
20
79
 
@@ -93,16 +152,16 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
93
152
  let connectData = jsonData["Connect"] as? [String: Any] {
94
153
  for (key, value) in connectData {
95
154
  if tealeafKeys.contains(key) {
96
- EOApplicationHelper.sharedInstance().setConfigItem(key, value: value, forModuleName: kTLFCoreModule)
155
+ ConnectConfigStore.set(key, value: value, forModule: kTLFCoreModule)
97
156
  } else if eocoreKeys.contains(key) {
98
- EOApplicationHelper.sharedInstance().setConfigItem(key, value: value, forModuleName: kEOCoreModule)
157
+ ConnectConfigStore.set(key, value: value, forModule: kEOCoreModule)
99
158
  } else if key == "layoutConfig",
100
159
  let layoutConfig = value as? [String: Any] {
101
160
  if let autoLayout = layoutConfig["AutoLayout"] {
102
- EOApplicationHelper.sharedInstance().setConfigItem("AutoLayout", value: autoLayout, forModuleName: kTLFCoreModule)
161
+ ConnectConfigStore.set("AutoLayout", value: autoLayout, forModule: kTLFCoreModule)
103
162
  }
104
163
  if let appendMapIds = layoutConfig["AppendMapIds"] {
105
- EOApplicationHelper.sharedInstance().setConfigItem("AppendMapIds", value: appendMapIds, forModuleName: kTLFCoreModule)
164
+ ConnectConfigStore.set("AppendMapIds", value: appendMapIds, forModule: kTLFCoreModule)
106
165
  }
107
166
  }
108
167
  }
@@ -116,8 +175,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
116
175
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
117
176
  /// - Returns: Whether it was able to set the value as Boolean value.
118
177
  func setBooleanConfigItemForKey(key: String, value: Bool, moduleName: String) throws -> Bool {
119
- let result = EOApplicationHelper().setConfigItem(key, value: value, forModuleName: moduleName)
120
- return result
178
+ return ConnectConfigStore.set(key, value: value, forModule: moduleName)
121
179
  }
122
180
 
123
181
  /// Sets the module's configuration item from AdvancedConfig.json or BasicConfig.plist that matches the specified key as a NString value.
@@ -127,8 +185,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
127
185
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
128
186
  /// - Returns: Whether it was able to set the value as Boolean value.
129
187
  func setStringItemForKey(key: String, value: String, moduleName: String) throws -> Bool {
130
- let result = EOApplicationHelper().setConfigItem(key, value: value, forModuleName: moduleName)
131
- return result
188
+ return ConnectConfigStore.set(key, value: value, forModule: moduleName)
132
189
  }
133
190
 
134
191
  /// Sets the module's configuration item from AdvancedConfig.json or BasicConfig.plist that matches the specified key as a NSNumber value.
@@ -138,8 +195,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
138
195
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
139
196
  /// - Returns: Whether it was able to set the value as Boolean value.
140
197
  func setNumberItemForKey(key: String, value: Double, moduleName: String) throws -> Bool {
141
- let result = EOApplicationHelper().setConfigItem(key, value: value, forModuleName: moduleName)
142
- return result
198
+ return ConnectConfigStore.set(key, value: value, forModule: moduleName)
143
199
  }
144
200
 
145
201
 
@@ -150,8 +206,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
150
206
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
151
207
  /// - Returns: Whether it was able to set the value.
152
208
  func setConfigItemForKey(key: String, value: Variant_Bool_String_Double, moduleName: String) throws -> Bool {
153
- var result = EOApplicationHelper().setConfigItem(key, value: convertVariantToAny(value), forModuleName: moduleName)
154
- return true
209
+ return ConnectConfigStore.set(key, value: convertVariantToAny(value), forModule: moduleName)
155
210
  }
156
211
 
157
212
  /// Gets the module's configuration item from AdvancedConfig.json or BasicConfig.plist that matches the specified key as a BOOL value.
@@ -161,8 +216,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
161
216
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
162
217
  /// - Returns: The value of the configuration item key as a BOOL value.
163
218
  func getBooleanConfigItemForKey(theDefault: Bool, key: String, moduleName: String) throws -> Bool {
164
- var result = EOApplicationHelper().getBOOLconfigItem(forKey: key, withDefault: theDefault, forModuleName: moduleName)
165
- return result
219
+ return ConnectConfigStore.bool(forKey: key, default: theDefault, moduleName: moduleName)
166
220
  }
167
221
 
168
222
  /// Gets the module's configuration item from AdvancedConfig.json or BasicConfig.plist that matches the specified key as a NString value.
@@ -172,7 +226,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
172
226
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
173
227
  /// - Returns: The value of the configuration item key as a NString value.
174
228
  func getStringItemForKey(theDefault: String, key: String, moduleName: String) throws -> Variant_NullType_String? {
175
- let result = EOApplicationHelper().getStringItem(forKey: key, withDefault: theDefault, forModuleName: moduleName)
229
+ let result = ConnectConfigStore.string(forKey: key, default: theDefault, moduleName: moduleName)
176
230
  return result.map { .second($0) }
177
231
  }
178
232
 
@@ -183,8 +237,7 @@ class HybridAcousticConnectRN: HybridAcousticConnectRNSpec {
183
237
  /// - moduleName: The name of the module to be updated. For EOCore settings, please use 'EOCore' which can be found the following files EOCoreBasicConfig.plist, EOCoreBasicConfig.properties or EOCoreAdvancedConfig.json and 'Connect' for Connect which can be found the following files ConnectBasicConfig.plist, ConnectBasicConfig.properties or ConnectAdvancedConfig.json.
184
238
  /// - Returns: The value of the configuration item key as a NSNumber value.
185
239
  func getNumberItemForKey(theDefault: Double, key: String, moduleName: String) throws -> Double {
186
- let result = EOApplicationHelper().getNumberItem(forKey: key, withDefault: theDefault as NSNumber, forModuleName: moduleName) as! Double
187
- return result
240
+ return ConnectConfigStore.number(forKey: key, default: theDefault, moduleName: moduleName)
188
241
  }
189
242
 
190
243
  /// Log custom event.
package/package.json CHANGED
@@ -192,7 +192,7 @@
192
192
  "source": "src/index",
193
193
  "summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
194
194
  "types": "./lib/typescript/src/index.d.ts",
195
- "version": "18.0.19",
195
+ "version": "18.0.20",
196
196
  "workspaces": [
197
197
  "example"
198
198
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "Connect": {
3
- "AndroidVersion": "11.0.7-beta",
3
+ "AndroidVersion": "11.0.8-beta",
4
4
  "AppKey": "b6c3709b7a4c479bb4b5a9fb8fec324c",
5
5
  "KillSwitchUrl": "https://lib-us-2.brilliantcollector.com/collector/switch/b6c3709b7a4c479bb4b5a9fb8fec324c",
6
6
  "PostMessageUrl": "https://lib-us-2.brilliantcollector.com/collector/collectorPost",