@kontextso/sdk-react-native 3.3.0-rc.0 → 3.3.0-rc.1

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.
@@ -106,12 +106,13 @@ public class KontextSDK: NSObject {
106
106
  /// - (rare) Data is returned as base64 String
107
107
  @objc
108
108
  public static func getTcfData() -> NSDictionary {
109
- let all = UserDefaults.standard.dictionaryRepresentation
109
+ let all: [String: Any] = UserDefaults.standard.dictionaryRepresentation
110
110
 
111
111
  let out = NSMutableDictionary()
112
- out.reserveCapacity(32)
113
112
 
114
- for (key, value) in all where key.hasPrefix("IABTCF_") {
113
+ for (key, value) in all {
114
+ guard key.hasPrefix("IABTCF_") else { continue }
115
+
115
116
  if let normalized = normalizeForReactNative(value) {
116
117
  out[key] = normalized
117
118
  } else {
@@ -135,11 +136,9 @@ public class KontextSDK: NSObject {
135
136
  return n
136
137
 
137
138
  case let b as Bool:
138
- // Just in case; usually arrives as NSNumber already.
139
139
  return NSNumber(value: b)
140
140
 
141
141
  case let d as Data:
142
- // Uncommon for TCF keys, but safe fallback.
143
142
  return d.base64EncodedString()
144
143
 
145
144
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextso/sdk-react-native",
3
- "version": "3.3.0-rc.0",
3
+ "version": "3.3.0-rc.1",
4
4
  "description": "Kontext SDK for React Native",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",