 import CoreLocation
 import UserNotifications
 
+private let sentNotificationDictKey = "sent_notifications_dict"
+
 class EventNotificationsManager {
+
+    fileprivate var sentNotifications: [String: [String]] {
+        get {
+            return UserDefaults.standard.dictionary(forKey: sentNotificationDictKey) as? [String : [String]] ?? [String : [String]]()
+        }
+
+        set {
+            UserDefaults.standard.set(newValue, forKey: sentNotificationDictKey)
+        }
+    }
 
     fileprivate var shouldFetchEvents: Bool {
         guard let eventFetchStartTime = eventFetchStartTime else {

            self.sendNotifications(forEvents: foundEvents)
        })
    }
}


    private func sendNotifications(forEvents events: [Event]) {
        for event in events {
            if isUnsent(event: event) {
                placeProvider.place(forKey: event.placeId) { place in
                    guard let place = place else { return }
                    DispatchQueue.main.async {
                        self.sendNotification(forEvent: event, atPlace: place)
                        self.markAsSent(event: event)
                    }
                }
            }
        }
