@kingstinct/react-native-healthkit 14.0.0 → 14.0.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.
package/ios/Helpers.swift CHANGED
@@ -86,14 +86,11 @@ func serializeAnchor(anchor: HKQueryAnchor?) -> String? {
86
86
  }
87
87
 
88
88
  func toBase64(_ data: Any?) -> String? {
89
- if let data = data {
90
- let data = NSKeyedArchiver.archivedData(withRootObject: data)
91
- let encoded = data.base64EncodedString()
92
-
93
- return encoded
89
+ guard let archivedData = try? NSKeyedArchiver.archivedData(withRootObject: data, requiringSecureCoding: true) else {
90
+ return nil
94
91
  }
95
92
 
96
- return nil
93
+ return archivedData.base64EncodedString()
97
94
  }
98
95
 
99
96
  func sampleQueryAsync(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kingstinct/react-native-healthkit",
3
- "version": "14.0.0",
3
+ "version": "14.0.1",
4
4
  "description": "React Native bindings for HealthKit",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",