I'm working on an app with CloudKit sync for its Core Data database right now. I want to add notifications to the app but am not sure the best way to go about getting notifications that will sync across devices. They will simply be timed notifications based on user-set due dates. Normally I would simply use UNUserNotificationCenter to create a UNNotificationRequest whenever a user sets a due date, but I want these notifications to sync across devices and I'm not sure exactly how to do that.
I know CloudKit can be used to send push notifications, but it doesn't seem like they're meant to be used on simple time triggers like this, are they?
The best idea I have right now is to listen for NSPersistentStoreRemoteChange and run through every single item, check to see if it has a notifications set on the device, and if not, to create one. That seems like a bit intensive of a task to be running every sync though.