Code Monkey home page Code Monkey logo

Comments (6)

ryanashcraft avatar ryanashcraft commented on June 12, 2024

@ximlu Please check out @thillsman's project for an example (specifically look at KnapsackManager.swift). Also pay attention to what is getting logged with subsystem "com.ryanashcraft.CloudSyncSession"

from cloudsyncsession.

ximlu avatar ximlu commented on June 12, 2024

I tried according to the configuration, but kept reporting errors. The following is the log of the project output

2023-09-27 10:43:37.727764+0800 Knapsack[1005:38787] [Sync Event] Start
2023-09-27 10:43:37.727913+0800 Knapsack[1005:38787] [Sync Event] Do work: Fetch
2023-09-27 10:43:37.727961+0800 Knapsack[1005:38787] [Sync Event] Do work: Create zone
2023-09-27 10:43:37.728002+0800 Knapsack[1005:38787] [Sync Event] Do work: Create subscription
2023-09-27 10:43:37.770861+0800 Knapsack[1005:38787] [Sync Event] Account status changed: Available
2023-09-27 10:43:41.090270+0800 Knapsack[1005:38787] Custom zone exists
2023-09-27 10:43:41.090747+0800 Knapsack[1005:38781] [Sync Event] Work success: Create zone
2023-09-27 10:43:43.196752+0800 Knapsack[1005:38789] [CK] Got a connection error for operation 884EF02AE430F6B5: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 969 named com.apple.cloudd was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service with pid 969 named com.apple.cloudd was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}
2023-09-27 10:43:43.202558+0800 Knapsack[1005:38782] Failed to check for subscription existence: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 969 named com.apple.cloudd was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service with pid 969 named com.apple.cloudd was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}
2023-09-27 10:43:43.204088+0800 Knapsack[1005:38789] [Sync Event] Halt

from cloudsyncsession.

ximlu avatar ximlu commented on June 12, 2024

image
I created a RecordType using my own account, and used the public_database as I wanted to check whether the data was successfully synced on the CloudKit dashboard. However, I have been receiving errors and am not quite sure where the problem lies. Here is a configuration:

static let storeIdentifier: String = "xxxxxxxxx"
static let zoneID: CKRecordZone.ID = .default
static let subscriptionID: String = ""
static let log: OSLog = .default

from cloudsyncsession.

ximlu avatar ximlu commented on June 12, 2024

I can basically confirm that there is indeed a problem with the framework, and I can upload it using the original API

from cloudsyncsession.

ryanashcraft avatar ryanashcraft commented on June 12, 2024

@ximlu I am not sure. I can tell you that this framework has been used in production for my app. There is likely something environmental causing issues. Are you testing this on a simulator or an actual device? The error seems to be underlying in the CloudKit framework itself, and CloudSyncSession is halting as a result.

Have you tried setting subscriptionID to something that's not empty string?

from cloudsyncsession.

ximlu avatar ximlu commented on June 12, 2024

@ryanashcraft I am using real device for testing, and the system is iOS16+. Therefore, I really hope that you can provide a demo without any issues. I highly doubt the reliability of the demo you mentioned for self-use.

from cloudsyncsession.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.