Swift - KVO data in iCloud

using iCloud to write KVO data (key : string)
there will be around 100 of these value, that will be updated/added by the user

I have two approaches

  1. on AppOpen - load all the data into an array, and write it back when AppClose
  2. on AppOpen - load it all, and write single records if/when they are editted or added

Is #2 considered “expensive”? It seems that it has the advantage that other instances of this app running on other devices could update in real time

Which brings another question… since this is “the cloud” what keeps other unrelated users inside their own sandbox, since the repository id is built into a Plist

$(TeamIdentifierPrefix)$(CFBundleIdentifier)

I’d expect apple does some sanity checks when you use the API’s since the signature can be checked to see you dont try to spoof things

but thats just a WAG (wild assed guess)

Thanks, like always the docs suck :slight_smile:
This method does not use CloudKit (the API is in UIKit it seems)
CloudKit requires the user log in to an iCloud account with their AppleID, this method does not

if uses Xcode “signing” data , which is immutable once the app is compiled

well what I could discern from the docs, was that any two (or more) devices running an instance of the same app,will share the iCloud data (since they would all have the same id [$(TeamIdentifierPrefix)$(CFBundleIdentifier)]

However, this doesn’t seem to be working… I have installed the same app on two diff REAL ATV devices, as well as simulator and real device. each one seems to operate in its own sandbox