Find list of Local Notification the app has already set

Recycled Steel picture Recycled Steel · Jul 8, 2013 · Viewed 30.1k times · Source

My app allows users to set a number of reminders in the future. When the app lauches I want to know what reminders (notifications) have already been set.

Can I read back the notifications I have set or do I need to store in my app (e.g. Core Data or Plist)?

Answer

Scott Berrevoets picture Scott Berrevoets · Jul 8, 2013

UIApplication has a property called scheduledLocalNotifications which returns an optional array containing elements of type UILocalNotification.

UIApplication.shared.scheduledLocalNotifications