CloudKit: Export Schema
cloudkit_export_schemaExport a CloudKit environment's full schema as a .ckdb document, returning the text or writing it to an output path. Diff the exported schemas from both environments to review pending changes.
Instructions
Export an environment's full schema as a .ckdb document. Returns the text, or writes it to outputPath and reports where it went. Exporting both environments and diffing them locally is one way to review a pending change; cloudkit_diff_schema is the direct one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outputPath | No | Write the schema here instead of returning it, e.g. "./dev.ckdb". | |
| containerId | No | The iCloud container id, e.g. "iCloud.com.acme.App". Get it from cloudkit_list_containers, or set CLOUDKIT_CONTAINER_ID to default it. | |
| environment | Yes | Which container environment. A Debug build's data and schema live in DEVELOPMENT; TestFlight and App Store builds use PRODUCTION. They are separate databases. |