I'm trying to add CloudKit sharing to my app. It's been... challenging so far.
Anyway, I think I am making progress but this afternoon testing, I'm seeing this message on two different devices (different iCloud accounts).
Error fetching zone changes for shared database: <CKError 0x1c005c6e0: "Service Unavailable" (6/2022); "Request failed with http status code 503"; Retry after 30.0 seconds>
Any idea why I'm getting a 503 error? This is with a development build of the app, though my schema is fully deployed. Waiting 30 seconds or as far as I can tell, any amount of time, has no impact.
Any help appreciated. I'm stuck at the moment.
I had the same issue. I Reset Developer Environment in the CloudKit Dashboard, did a fresh install of the builds on my devices and things seemed to work again.
You might be inadvertently using the wrong server change token. If you have identically named zones in the private and shared databases and you are fetching changes in the private database first, you may be accidentally passing the server change token for the private zone into the fetch for the shared database. This would produce a 503 error like you describe.