I’m running into a CloudKit sync issue that I can’t reconcile after multiple rebuilds, TestFlight uploads, and entitlement verification, and I’m hoping for guidance on what I’m missing or whether this is expected behavior.
Context
- App: RankSpinnah
- Platforms: iOS + macOS
- Distribution: TestFlight
- Xcode: 26.x
- Both apps use the same bundle identifier, same container, and same Apple Developer team
- Automatic signing enabled; Xcode-managed profiles
- CloudKit capability enabled for both targets
Both builds install and run correctly from TestFlight on:
- iPhone 17 Pro
- Apple-silicon Mac (M5 MacBook Pro)
The Problem
CloudKit data does not sync at all between devices.
On both iOS and macOS, CloudKit queries return no records, and I consistently see this error:
Field 'recordName' is not marked queryable
This occurs even when querying for records that should exist and after fresh installs on both devices.
What I’ve Verified
- Same iCloud account signed in on both devices
- CloudKit container exists and is enabled
- App Sandbox enabled with network access
- CloudKit entitlements present in the signed app (verified from the archived .app)
- TestFlight builds are using the correct container
- Rebuilt and re-uploaded after version bump (1.2.0 / build 2026.02.03)
- Both iOS and macOS apps successfully uploaded and installed via TestFlight
Despite this, no data syncs, and the queryable error persists.
What I’m Unsure About
- Whether recordName is expected to be non-queryable in production schemas
- Whether TestFlight + CloudKit requires an explicit production schema deploy beyond what Xcode manages
- Whether this indicates a schema mismatch between development and production environments
- Or whether something subtle changed in recent Xcode / CloudKit behavior
Ask
- Can someone clarify:
- Whether querying by recordName should work in production CloudKit
- What specifically causes the “Field recordName is not marked queryable” error in TestFlight builds
- What steps are required to ensure CloudKit schemas are correctly deployed for cross-platform sync
At this point I feel like I’m missing one critical step, but I can’t identify what it is.
Thanks in advance for any guidance.
Whether querying by recordName should work in production CloudKit
Yes, in case you have the appropriate indice in the CloudKit production environment.
What specifically causes the “Field recordName is not marked queryable” error in TestFlight builds
The error is triggered when you try yo query a CloudKit record type and the type doesn't have the index for its recordName field.
If the error only occurs in the production environment, which is by default used by a TestFlight build, and not in the development environment, it will indicate that the CloudKit schema in the development environment is not completely deployed to the production environment.
To address the error, try to use CloudKit Console to add the indice, as discussed here and here.
What steps are required to ensure CloudKit schemas are correctly deployed for cross-platform sync
If you can use CKTool to dump the schemas, as discussed in Automate CloudKit tests with cktool and declarative schema, and then compare and contrast them.
If your schema isn't that complicated, you can also use CloudKit Console manually ensure that the CloudKit schemas in the development an production environments are the same.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.