@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 +3 -6
- package/package.json +1 -1
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
|
-
|
|
90
|
-
|
|
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
|
|
93
|
+
return archivedData.base64EncodedString()
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
func sampleQueryAsync(
|