User Notifications in SwiftUI

Hello

How can I set up local notifications that repeat every X minutes from a certain hour to another hour.

For example, I want to receive a notification every 60 minutes starting from 12:00 AM to 10:00 PM?

    func scheduleNotifications()  {
        let content = UNMutableNotificationContent()
        content.title = "App"
        content.subtitle = "App"
        content.sound = UNNotificationSound.default
        
        let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 60, repeats: true)
        let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
        UNUserNotificationCenter.current().add(request)
    }

With this code I can schedule a notification every minute, however, I cannot decide from what time it should start or when it stops.

Any ideas?

Thank you!

User Notifications in SwiftUI
 
 
Q