Im still seeing the problem in Beta 5. AT first I thought it was working as one simulator was correctly connecting, but then running it on a second simulator (or on a real device) resulted in no updates to CloudKit from the new devices, and the auth token error came back.
Interestingly, the first simulator that ran the program continues to communicate correctly with iCloud.
Can someone please try the following to confirm it's not just me:
- Create a new project with CoreData and CloudKit enabled
- Make the boiler plate changes to correct the on-screen behaviour (the View body should be as below)
- Set the deployment target to iOS 15
- Add the background -> remote notifications capability
- Add the iCloud -> CloudKit capability
- Connect to an existing container (creating a new container seems to be troublesome, with CloudKit console unable to list the new zones)
- Build and run on one simulator (log messages should indicate success)
- Build and run on a second simulator (log messages may display "auth token" error
That's in advance to anyone who can confirm this.
Andy
Working boilerplate body here:
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 Item", systemImage: "plus")
}
}
}
}