I have the following code for the request and posting the notification:
let request = UNNotificationRequest(identifier: "timerDone", content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)
It's in a for loop so normally gets executed multiple times - each iteration of the loop results in this code being run, however for each iteration the request has the same identifier.
Does this mean I am overriding the previous notification I just added in the previous iteration of the loop? (the reason I am asking is because only one notification comes through after closing the app even if there are multiple timers; the notification is usually for that of the timer which was the last iteration in the for loop (this code is in application did resign active)).