@onekeyfe/react-native-cloud-kit-module 1.1.14 → 1.1.15
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
package com.margelo.nitro.cloudkitmodule
|
|
2
2
|
|
|
3
3
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
4
|
-
import com.margelo.nitro.core.NullType
|
|
5
4
|
import com.margelo.nitro.core.Promise
|
|
6
5
|
|
|
7
6
|
@DoNotStrip
|
|
@@ -30,8 +29,8 @@ class CloudKitModule : HybridCloudKitModuleSpec() {
|
|
|
30
29
|
)
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
override fun fetchRecord(params: FetchRecordParams): Promise<
|
|
34
|
-
return Promise.resolved(
|
|
32
|
+
override fun fetchRecord(params: FetchRecordParams): Promise<RecordResult?> {
|
|
33
|
+
return Promise.resolved(null)
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
override fun deleteRecord(params: DeleteRecordParams): Promise<Unit> {
|
package/ios/CloudKitModule.swift
CHANGED
|
@@ -76,7 +76,7 @@ class CloudKitModule: HybridCloudKitModuleSpec {
|
|
|
76
76
|
|
|
77
77
|
// MARK: - Fetch Record
|
|
78
78
|
|
|
79
|
-
public func fetchRecord(params: FetchRecordParams) throws ->
|
|
79
|
+
public func fetchRecord(params: FetchRecordParams) throws -> Promise<RecordResult?> {
|
|
80
80
|
return Promise.async {
|
|
81
81
|
let ckRecordID = CKRecord.ID(recordName: params.recordID)
|
|
82
82
|
|
|
@@ -88,18 +88,16 @@ class CloudKitModule: HybridCloudKitModuleSpec {
|
|
|
88
88
|
let createdAt = Int64((record.creationDate?.timeIntervalSince1970 ?? 0) * 1000)
|
|
89
89
|
let modifiedAt = Int64((record.modificationDate?.timeIntervalSince1970 ?? 0) * 1000)
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
modifiedAt: Double(modifiedAt))
|
|
91
|
+
return RecordResult(
|
|
92
|
+
recordID: record.recordID.recordName,
|
|
93
|
+
recordType: record.recordType,
|
|
94
|
+
data: data,
|
|
95
|
+
meta: meta,
|
|
96
|
+
createdAt: Double(createdAt),
|
|
97
|
+
modifiedAt: Double(modifiedAt)
|
|
99
98
|
)
|
|
100
|
-
return result
|
|
101
99
|
} catch let error as CKError where error.code == .unknownItem {
|
|
102
|
-
|
|
100
|
+
return nil
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-cloud-kit-module",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "react-native-cloud-kit-module",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"react": "19.2.0",
|
|
83
83
|
"react-native": "0.83.0",
|
|
84
84
|
"react-native-builder-bob": "^0.40.13",
|
|
85
|
-
"react-native-nitro-modules": "0.
|
|
85
|
+
"react-native-nitro-modules": "0.33.2",
|
|
86
86
|
"release-it": "^19.0.4",
|
|
87
87
|
"turbo": "^2.5.6",
|
|
88
88
|
"typescript": "^5.9.2"
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"react": "*",
|
|
92
92
|
"react-native": "*",
|
|
93
|
-
"react-native-nitro-modules": "
|
|
93
|
+
"react-native-nitro-modules": "0.33.2"
|
|
94
94
|
},
|
|
95
95
|
"react-native-builder-bob": {
|
|
96
96
|
"source": "src",
|