Harden Apple Watch snapshot synchronization
This commit is contained in:
@@ -563,6 +563,8 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer {
|
||||
|
||||
public protocol WatchCoreProtocol: AnyObject, Sendable {
|
||||
|
||||
func applyAuthoritativeSnapshot(snapshot: Data) throws -> WatchSnapshotUpdate
|
||||
|
||||
func applySnapshot(snapshot: Data) throws -> WatchSnapshotUpdate
|
||||
|
||||
func noPersistedSnapshot() throws
|
||||
@@ -633,6 +635,16 @@ open class WatchCore: WatchCoreProtocol, @unchecked Sendable {
|
||||
|
||||
|
||||
|
||||
open func applyAuthoritativeSnapshot(snapshot: Data)throws -> WatchSnapshotUpdate {
|
||||
return try FfiConverterTypeWatchSnapshotUpdate_lift(try rustCallWithError(FfiConverterTypeWatchFfiError_lift) {
|
||||
uniffiCallStatus in
|
||||
uniffi_ironstorage_watch_fn_method_watchcore_apply_authoritative_snapshot(
|
||||
self.uniffiCloneHandle(),
|
||||
FfiConverterData.lower(snapshot),uniffiCallStatus
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
open func applySnapshot(snapshot: Data)throws -> WatchSnapshotUpdate {
|
||||
return try FfiConverterTypeWatchSnapshotUpdate_lift(try rustCallWithError(FfiConverterTypeWatchFfiError_lift) {
|
||||
uniffiCallStatus in
|
||||
@@ -1384,6 +1396,9 @@ private let initializationResult: InitializationResult = {
|
||||
if (uniffi_ironstorage_watch_checksum_func_watch_core() != 47212) {
|
||||
return InitializationResult.apiChecksumMismatch
|
||||
}
|
||||
if (uniffi_ironstorage_watch_checksum_method_watchcore_apply_authoritative_snapshot() != 29816) {
|
||||
return InitializationResult.apiChecksumMismatch
|
||||
}
|
||||
if (uniffi_ironstorage_watch_checksum_method_watchcore_apply_snapshot() != 6162) {
|
||||
return InitializationResult.apiChecksumMismatch
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user