Search code examples
iosuilocalnotification

Find list of Local Notification the app has already set


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)?


Solution

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

    UIApplication.shared.scheduledLocalNotifications