Unable to see data from a production environment

I am trying to test using Testflight and have set up a test with a user on an account I also own which is different to me developer account. The app I believe is running in production on a separate device and is working from a user point of view, however I am not able to query the data via the console. As I said I know the user id and password as tey are mine so even when I use the Act as user service it logs in but the query is empty. I'm assuming I'm not doing anything wrong its possibly an security issue that is preventing me accessing this account. My question to the group then is how do I verify the data that is being tested?

Yeah, you should be able to verify the data using CloudKit Console. If you are sure that the data is there but can't find it, check the following:

  • The record type is queryable, meaning that it has the right QUERYABLE indices. See Inspecting and Editing an iCloud Container’s Schema.

  • The device where your app runs must be logged in with the same Apple account as the one you log in CloudKit Console with, assuming you are using the private database.

  • The developer team, iCloud container, environment, database, record zone, and record type when querying data are correct. A TestFlight app uses CloudKit production environment (unless you change the CloudKit environment entitlement).

If these are all correct, and yet your query still doesn't work, it can be that the data has not indexed yet. You can try:

  1. Remove the QUERYABLE index, and add it back.
  2. Allow some time (probably one day or two) for CloudKit to re-index data.

If you use extra filters or sort descriptors in your query, remove them (temporarily) and see if that changes anything.

If the issue is still there after all these checks, I’d suggest that you file a feedback report to report the issue and share your report ID here. Be sure to include the following information in your report:

  • Screenshot to show that you use the right settings but the issue is there.
  • Your CloudKit container.
  • Your team ID.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Unable to see data from a production environment
 
 
Q