CloudKit, cannot deploy private database initial schema to production

We’re using a private database with a custom zone. Record types and related schema are created programmatically rather than through the dashboard.

When running the app in the development environment, I can see that data is saved and can be retrieved successfully. However, in the iCloud console, I don’t see any record types or even the custom zone.

Additionally, I’m unable to deploy any schema to production because no changes are detected.

Do you have any ideas on what we might be missing?

Installing the app from TestFlight when trying to upload a record CloudKit reports this error: <CKError 0x13f40bb10: "Invalid Arguments" (12/2006); server message = "Cannot create new type MyType in production schema" ...>

When running the app in the development environment, I can see that data is saved and can be retrieved successfully. However, in the iCloud console, I don’t see any record types or even the custom zone.

Hmm, this doesn't sound right. Would you mind to share the detailed steps you used to reproduce the issue? It will be really strange if you see the data but not the schema in CloudKit Console. Be sure that you choose the right container and the development environment.

Additionally, I’m unable to deploy any schema to production because no changes are detected.

CloudKit Console doesn't deploy the schema, if the schema in the development environment is indeed empty.

Installing the app from TestFlight when trying to upload a record CloudKit reports this error: <CKError 0x13f40bb10: "Invalid Arguments" (12/2006); server message = "Cannot create new type MyType in production schema" ...>

The error indicates that MyType didn't exist and the attempt to create it failed, which is as-designed because a TestFlight app by default uses the CloudKit production environment and creating a new record type isn't allowed in the environment.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

CloudKit, cannot deploy private database initial schema to production
 
 
Q