2

Built-in iOS Reminders app allows us to create to-do lists with their own reminders (notifications). And all of the lists, and reminders are can easily sync across the iCloud devices.

Once synced the iCloud devices can easily send (location and calendar) notifications, while offline. Is it possible to create an app like the iOS Reminders (sync notifications)? I’m sorry, I haven’t any example (code) to share with you.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mannopson
  • 2,634
  • 1
  • 16
  • 32

1 Answers1

1

It sounds like your question is if you can sync notifications with iCloud. The answer is yes.

Here are couple considerations:

  • Apple is more than likely syncing Reminder records over CloudKit. The "notifications" are probably attributes of a Reminder record with dates, times, and places saved along with them so they know when and where to show the notifications.
  • To show notifications offline, you will use the data in each Reminder record to trigger them with UNUserNotificationCenter. How to do this is pretty well covered across multiple versions of Swift in this post.

I hope that helps get you started. Good luck!

Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
  • Don't you have to use silent push notifications to create local notifications across devices? – rs7 Dec 22 '19 at 11:44
  • @rs7 Not yet, any suggestions? – Mannopson Jan 06 '20 at 09:45
  • 3
    When creating a local notification for current device, I create a CKRecord Reminder and I'm using CKSubscriptions to sync notifications across devices. You can pass the relevant info through the CKSubscription payload (such as date, identifier, title, message etc), and from that you can create a local notification for every other device inside didReceiveRemoteNotification. Hope this makes sense. – rs7 Jan 06 '20 at 13:55