I have a question regarding push notifications. We are implementing a feature where the user is able to schedule notifications. I have managed to get the scheduling working. The problem is they still receive the original notification. The one that comes in at 11am is received in this function UNUserNotificationCenter, willPresent notification: UNNotification when app is in foreground. The problem is how to invoke UNUserNotificationCenter, willPresent notification: UNNotification when app is in background
Scenario:
The notifications are supposed to come in at 11am
Problem
If i set the time to 12pm I get the notification at 11am and 12pm
The body for sending the notification looks like this
{
"to" : "FCM Token",
"notification" : {
"body" : "Body of Your Notification",
"title": "Title of Your Notification"
}
}