How to show local notification when the app is foreground?
In order to display the notification when the app is foreground/open, you need to add a delegate method. You have to implement UNUserNotificationCenterDelegate in order to get the local notification when the app is open. Add the following extension in…