Post

Replies

Boosts

Views

Activity

Reply to Custom Zones Are Not Allowed in Public DB / Xcode 13 & iOS 15
A follow-up. I'm still not convinced this is 100% correct. My code was working fine again, then seemed to deteriorate and then stopped working altogether. I have been able to get it going again. It appears to be linked to the Cloudkit schema. The initialise of the schema alone does not appear to be enough. I am pretty sure it was before, because I would do the intialise, then manually create the indexes after to see my records. To get this working again I had to pre-create the indexes as I was getting error messages saying the mirroring delegate had not successfully initialized due to error  "Invalid Arguments" (12/2015); server message = "Field 'recordName' is not marked queryable"; So recordID needs a queryable index, and modTime needs queryable and sortable. I also noticed that there seems to be a glitch in the Cloudkit Dashboard, and if you add the two indexes for modTime at the same time, one of them won't appear. So make sure you check after. If this continues to plague me as it has now for over a month, I'll add an update. If anyone spots that I am making a newb error, please leave a comment and let me know.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to NSPersistentCloudKitContainer with public database doesn't work and is poorly documented
I was also getting the "Custom zones are not allowed. in the public DB" message when no custom zone had been created on every run of the app I was developing except for the the first run, so it sounds broadly similar to your issue. Xcode 13.1 was installed this morning, and it was still an issue, but when I also upgraded my test device to iOS 15.1 the issue now appears to have cleared and I can sync to the public database again. Don't know if it was iOS 15.1 or the combination of the two.
Oct ’21