Sorix / CloudCore

Framework that enables syncing between iCloud (CloudKit) and Core Data
MIT License
153 stars 40 forks source link

Initialization #15

Closed Jerland2 closed 6 years ago

Jerland2 commented 6 years ago

Just ran through setup and I am attempting to get it started. However I have run into a major problem.

The first entity that I create (conforms to your documentation) which has a To Many relationship fails to sync due to the following error:

SaveToCloudDidFailed: <CKError 0x1cc242e20: "Invalid Arguments" (12/2006); server message = "cannot use an empty list to initialize a new field (field 'personToBook' in record type 'Person' should be more precise)"; uuid = 3039A5Q3-BFC1-48AF-A442-35A982C5B466; container ID = "iCloud.com.com.bookMaster"> SaveToCloudDidFailed: <CKError 0x1c8247860: "Partial Failure" (2/1011); "Failed to modify some records"; uuid = 3039Q5F3-BFC1-48AF-A442-35A982C5B466; container ID = "iCloud.com.com.bookMaster"; partial errors: { 969F05Q4-DA54-4D21-B87A-9F73F0F0BD77:(CloudCore:defaultOwner) = <CKError 0x1cc241140: "Invalid Arguments" (12/2006); server message = "cannot use an empty list to initialize a new field (field 'personToBook' in record type 'Person' should be more precise)"; uuid = 3039A5F3-BFC1-48AF-A442-35A982C5B466> }>

If I understand this correctly it is having issues because I did not set a value for the to-many relationship. HOWEVER there can never be a value because if I am creating the parent object to the relationship there cannot be a sub object yet.

Am I missing something here? Seems like a MAJOR problem

Sorix commented 6 years ago

@Jerland2, for the first run you need to fill test data, so CloudKit schemes maybe correctly automatically initialised.

Also please test using v2 (#13), v1 has a lot of bugs and it is deprecated.

Sorix commented 6 years ago

Issue closed with v2 release. Please re-submit if issue still persists.