Automate processes to support local integration testing and continuous integration systems using CloudKit tools.

Posts under cktool tag

1 Post
Sort by:

Post

Replies

Boosts

Views

Activity

Critical: Cannot Deploy CloudKit Schema to Production Environment - Internal Error
Hi Developer Community, I'm experiencing a critical issue with CloudKit schema deployment that's blocking my app release. I've been trying to resolve this for several days and would appreciate any assistance from the community or Apple engineers. Issue Description I'm unable to deploy my CloudKit schema from development to production environment. When attempting to deploy through the CloudKit Dashboard, I either get an "Internal Error" message or the deployment button is disabled. Environment Details App: Reef Trak (Reef aquarium tracking app) CloudKit Container: ************ Development Environment: Schema fully defined and working correctly Production Environment: No schema deployed (confirmed in dashboard) What I've Tried Using the "Deploy Schema to Production" button in CloudKit Dashboard (results in "Internal Error") Exporting schema from development and importing to production (fails) Using CloudKit CLI tools with API token (results in "invalid-scope" errors) Waiting 24-48 hours between attempts in case of propagation delays Current Status App works perfectly in development environment (when run from Xcode) In TestFlight/sideloaded builds (production environment), the app attempts to fetch records but fails with "Did not find record type: Tank" errors Log snippet showing the issue: [2025-03-21] [CloudKit] Schema creation failed: Error saving record <CKRecordID: 0x******; recordName=SchemaSetup_Tank_-**---****, zoneID=_defaultZone:defaultOwner> to server: Cannot create new type Tank in production schema [2025-03-21] [CloudKit] Failed to create schema for Tank after 3 attempts [2025-03-21] [CloudKit] Error creating schema for Tank: Error saving record <CKRecordID: 0x****; recordName=SchemaSetup_Tank_---**-**********, zoneID=_defaultZone:defaultOwner> to server: Cannot create new type Tank in production schema App Architecture & Critical Impact My app "Reef Trak" is built around a core data model where the "Tank" entity serves as the foundational element of the entire application architecture. The Tank entity is not just another data type - it's the primary container that establishes the hierarchical relationship for all other entities: All parameter measurements (pH, temperature, salinity, etc.) are associated with specific tanks All maintenance tasks and schedules are tank-specific All livestock (fish, corals, invertebrates) exist within the context of a tank All user achievements and progress tracking depend on tank-related activities Without the Tank schema being properly deployed to production, users experience what appears to be a completely empty application, despite successful authentication and CloudKit connection. The app shows "Successfully retrieved iCloud data" but displays no content because: The Tank record type doesn't exist in production Without Tanks, all child entities (even if their schemas existed) have no parent to associate with This creates a cascading failure where no data can be displayed or saved This issue effectively renders the entire application non-functional in production, despite working flawlessly in development. Users are left with an empty shell of an app that cannot fulfill its core purpose of reef tank management and monitoring. The inability to deploy the Tank schema to production is therefore not just a minor inconvenience but a complete blocker for the app's release and functionality. Questions Is there an alternative method to deploy schema to production that I'm missing? Could there be an issue with my account permissions or container configuration? Are there known issues with the CloudKit Dashboard deployment functionality? What's the recommended approach when the dashboard deployment fails? I've also submitted a Technical Support Incident, but I'm hoping to get this resolved quickly as it's blocking my App Store release. Thank you for any assistance!
3
0
79
1w