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

Posts under cktool tag

7 Posts

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
268
Mar ’25
cktool query-records
I cannot seem to get cktool query-records to work no matter what I do. I get the following very generic error message. Even when I use the commands you provide in the man page: ❌ An error occurred while performing the command. Operation: query Session has expired or is invalid. A new user token may be required. However, when I run get-teams, or export-schema it works just fine. I'm unsure if this tool is ready for release tbh.
1
0
698
Oct ’21
cktool: parent, reference, and record name fields
A few questions about advanced use of cktool for record creation and filtering. Is it possible to filter by record name? I.e query for a record with a specific recordName? Is there any way to specify record parent and reference fields when creating a record? All the examples of JSON fields so far that I have seen are of simple value types. Is there any way to filter/query by reference-type field?
1
0
1.2k
Sep ’21
I can't find cktool... can anyone help?
Hi hive mind, I have Xcode Beta 4 and I've been trying to use the "cktool" development tool for command line interaction with CloudKit, but for whatever reason when I follow the video from WWDC21-10118, xcrun cannot find cktool. HAs anyone managed to run the tool as yet? I am assuming not, because there are no questions about cktool in the forum as far as I can tell. Or.... it just works and I'm doing something dumb. Either way some assistance would be great, especially from our friends in Apple.
3
0
1.6k
Jul ’21
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!
Replies
3
Boosts
0
Views
268
Activity
Mar ’25
Cloudkit- Security Roles permissions
Very simple one. how do I add “create“ permissions for my CloudKit security roles. For some reason “create“ is greyed out when I try to check the box for _creator
Replies
0
Boosts
0
Views
757
Activity
Dec ’23
Integration Refence Required
Hello Team I want to use Refund Payment Method Api any refence document or Curl method ? Thanks and Regards Zain Ul Hasan
Replies
1
Boosts
0
Views
875
Activity
May ’22
Salesforce integration with app store
I want to integrate my salesforce org with app store by which all of the reviews can be captured within salesforce and i also want to reply for the same. So, I need APIs for this integration. It would be soo helpful if you could help me. Thanks
Replies
1
Boosts
0
Views
941
Activity
Jan ’22
cktool query-records
I cannot seem to get cktool query-records to work no matter what I do. I get the following very generic error message. Even when I use the commands you provide in the man page: ❌ An error occurred while performing the command. Operation: query Session has expired or is invalid. A new user token may be required. However, when I run get-teams, or export-schema it works just fine. I'm unsure if this tool is ready for release tbh.
Replies
1
Boosts
0
Views
698
Activity
Oct ’21
cktool: parent, reference, and record name fields
A few questions about advanced use of cktool for record creation and filtering. Is it possible to filter by record name? I.e query for a record with a specific recordName? Is there any way to specify record parent and reference fields when creating a record? All the examples of JSON fields so far that I have seen are of simple value types. Is there any way to filter/query by reference-type field?
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’21
I can't find cktool... can anyone help?
Hi hive mind, I have Xcode Beta 4 and I've been trying to use the "cktool" development tool for command line interaction with CloudKit, but for whatever reason when I follow the video from WWDC21-10118, xcrun cannot find cktool. HAs anyone managed to run the tool as yet? I am assuming not, because there are no questions about cktool in the forum as far as I can tell. Or.... it just works and I'm doing something dumb. Either way some assistance would be great, especially from our friends in Apple.
Replies
3
Boosts
0
Views
1.6k
Activity
Jul ’21