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" ...>

Black cat's user avatar

Black cat

7,6268 gold badges73 silver badges100 bronze badges

ArgBat's user avatar

In CloudKit, the Development environment is "flexible", but Production is "frozen". You cannot create new Record Types or modify fields via code once you're in Production/TestFlight.

The Problem: Schema Sync

If you don't see anything in the iCloud Console, your "programmatic" creation in Dev might only be living in your local cache or haven't been successfully pushed to the Apple servers yet.

The Fix: Manual Deployment

You need to explicitly tell Apple to move your Dev schema to Prod. Here is the workflow to get those changes to show up:

Open iCloud Console -> CloudKit Database

Select your Container and ensure "Development" is selected in the top bar

Go to "Schema" -> "Record Types"

If it's empty, your Dev app hasn't successfully synced a record yet. Run it again and verfiy the save callback

Once your types appear in Dev, go to "Deploy Changes to Production" (the blue button in the Schema section)

Laurin F.'s user avatar

New contributor

Laurin F. is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.