OK. One of the problems was that the body method of the ContentView isn't correct out of the box... once resolved it performs correctly in Xcode 12 under the accompanying simulator.
However in the current Xcode 13 Beta it fails to operate as expected with CloudKit (I've reported this via Feedback), resulting in the identify issues as above ("Failed to modify some record zones", "Failed to set up CloudKit integration for store", "Failed to modify some record zones", "Failed to sync user keys" are the errors being reported)
I believe the ContentView.swift body method should read as follows:
NavigationView {
List {
ForEach(items) { item in
Text("Item at \(item.timestamp!, formatter: itemFormatter)")
}
.onDelete(perform: deleteItems)
}
.toolbar {
#if os(iOS)
ToolbarItem(placement: .bottomBar){
EditButton()
}
#endif
ToolbarItem (placement: .primaryAction) {
Button(action: addItem) {
Label("Add an Item", systemImage: "plus")
}
}
}
}
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: