Best Practice? Core Data with CloudKit and unique elements

I have an app with Core Data with CloudKit. I want to use a unique element among other non-unique elements in that sense that it should be there after installation of an app, but it should be there only once on all devices. Not one separate for each device, it should be the same on all devices.

As I do not know whether the app was already installed on another device and maybe not synchronized to iCloud, what would be the best practice to handle such unique elements?

Replies

Looks like you could put NSUbiquitousKeyValueStore to good use.

Start here: https://developer.apple.com/documentation/foundation/icloud/synchronizing_app_preferences_with_icloud