iCloud integration works in a development environment and fails in a production environment. It would appear that the custom record zones are not being deployed alongside the record types. Allow me to explain.
Configuration: The iCloud development schema we configured has more than one distinct custom record zones, each with their own record types. In development mode, it works perfectly - data persists across devices, and all of the records and their zones are visible on the iCloud dashboard.
Observation: As we deployed the schema to the production environment, however, the custom record zones were left out. The record types were successfully deployed, but they remain useless since the server is unaware of the custom record zones.
You won't be shocked to learn that every time a production app tries to sync with iCloud, it is told (an error is logged) that the record type does not exist.
What we have tried: We have tried rebuilding the iCloud container from scratch, and we have tried manually creating the custom record zones on the dashboard. Neither worked.
Additionally, we deployed a (seemingly) identical schema for a different app just 1-2 weeks ago and it went off without any issue.
Does anyone have any ideas as to what the issue might be and how to fix it?