What interfaces do I use to propagate a CloudKit change in a shared zone to a notification/badge to all participants in the shared zone?
Assume I have a 'League' that is the root object in a shared zone and that N Players are members of the league. One of the players, the 'organizer', schedules a 'Game' that is open to any of the players. When the organizer creates the game (in the league's shared zone) and it is mirrored in CloudKit, how can the other players see it (as a timely notification)?
I already observe .NSPersistentStoreRemoteChange
on NSPersistentStoreCoordinator
and NSPersistentCloudKitContainer.eventChangedNotification
on NSPersistentCloudKitContainer
. Are these delivered in the background? Can/Should they generate a 'local/remote' notification for handling at the AppDelegate level? How?
Do I need to use a CKDatabaseSubscription
looking for CD_Game
records directly? (I'd rather not; because then I'd have a potential race between the remote iCloud database(s) and the local CoreData)