Querying Cloud Kit Core Data Record

I have a app that I'm trying to migrate over to using CloudKit to store the core data so it can be synced across devices.

The syncing is working fine, the issue I'm having is that the app adds some initial data to the database, this is causing it to be duplicated when its installed on another device. Currently I'm using user defaults to store a bool locally if the first run has been performed, which obviously only works per device

Is there any way to see if data already exists in the cloud and prevent the addition of the initial data.

Apple's documentation would suggest its possible if an object already exists but on first launch there's no objects in the local store.

I don't want to query any particular record, just if records exist
https://developer.apple.com/documentation/coredata/mirroring_a_core_data_store_with_cloudkit/reading_cloudkit_records_for_core_data
Querying Cloud Kit Core Data Record
 
 
Q