When I fetch records on CloudKit Console, it fails

The error message is: Field 'recordName' is not marked queryable

So I manually add the 'recordName' field on my Record Type and edit index to add 'recordName' as queryable.

After my tweak, it stills shows me that error message. Could you guys tell me how to fix it?

Thank you.

Replies

Depending on how many records are in your container, it may take some time for the indexes to be created. The new CloudKit Console does flash the message "Building new indexes may take time to complete." to warn you about the potential delay.

Could you please check to see that the new index is in the UI, and try your query again?

I'm having this same issue and it's not showing the "building indexes may take time to complete" warning. I just added a new record programatically and I can't query it because of this.

I also have this issue. I'm using NSPersistentCloudKitContainer, is that something y'all are using too?

Filed: FB9215275

@sergiocampama index creation requests are immediate, but the indexes themselves may take time to create. This is especially true if there is a lot of existing data for your record type. There can even be a delay to create indexes when there is no data for the record type as well so please retry your query.