@onekeyfe/react-native-cloud-kit-module 1.1.15 → 1.1.16
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,6 +1,7 @@
|
|
|
1
1
|
package com.margelo.nitro.cloudkitmodule
|
|
2
2
|
|
|
3
3
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
4
|
+
import com.margelo.nitro.core.NullType
|
|
4
5
|
import com.margelo.nitro.core.Promise
|
|
5
6
|
|
|
6
7
|
@DoNotStrip
|
|
@@ -29,8 +30,8 @@ class CloudKitModule : HybridCloudKitModuleSpec() {
|
|
|
29
30
|
)
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
override fun fetchRecord(params: FetchRecordParams): Promise<
|
|
33
|
-
return Promise.resolved(
|
|
33
|
+
override fun fetchRecord(params: FetchRecordParams): Promise<Variant_NullType_RecordResult> {
|
|
34
|
+
return Promise.resolved(Variant_NullType_RecordResult.create(NullType.NULL))
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
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 -> Promise<
|
|
79
|
+
public func fetchRecord(params: FetchRecordParams) throws -> Promise<Variant_NullType_RecordResult> {
|
|
80
80
|
return Promise.async {
|
|
81
81
|
let ckRecordID = CKRecord.ID(recordName: params.recordID)
|
|
82
82
|
|
|
@@ -88,16 +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
|
-
return RecordResult(
|
|
91
|
+
return Variant_NullType_RecordResult.second(RecordResult(
|
|
92
92
|
recordID: record.recordID.recordName,
|
|
93
93
|
recordType: record.recordType,
|
|
94
94
|
data: data,
|
|
95
95
|
meta: meta,
|
|
96
96
|
createdAt: Double(createdAt),
|
|
97
97
|
modifiedAt: Double(modifiedAt)
|
|
98
|
-
)
|
|
98
|
+
))
|
|
99
99
|
} catch let error as CKError where error.code == .unknownItem {
|
|
100
|
-
return
|
|
100
|
+
return Variant_NullType_RecordResult.first(NullType.null)
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|