I am trying to send a local notification at a scheduled time. But notifications do not appear on the screen, but appear in the notification center when I scroll down.
This is what I am trying to achieve. This is what I get.



This code is from my AppDelegate didFinishLaunchingWithOptions ().
// Setup local push notifications application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: [UIUserNotificationType.Alert, UIUserNotificationType.Badge, UIUserNotificationType.Sound], categories: nil)) scheduleNotifications()
And this is the code for scheduleNotifications ()
func scheduleNotifications() {
Any help would be greatly appreciated. Thanks!
source share