title: How to schedule repeat-notification every 2 second after particular time period?
body: <p>//this method start send notification after one minutes , i want method for start notification after given time period and repeat itself after 2 second.</p>
  <pre><code>import UIKit
  import UserNotifications
  
  class ViewController: UIViewController{
      let notification = UNUserNotificationCenter.current()
      override func viewDidLoad() {
          super.viewDidLoad()
          notification.requestAuthorization(options: [.alert,.sound,.badge]){ isAccess, error in
              if isAccess , error == nil {
                  var second = 60
                  for _ in 0...31 {
                      self.sendNotificationOnDate(second: &amp;second)
                  }
              }
              else{
                  print(&quot;not access&quot;)
              }
          }
          notification.delegate = self
      }
      
      func sendNotificationOnDate(second: inout Int){
          let id = UUID().uuidString
          let content = UNMutableNotificationContent()
          
          content.title =  &quot;Alarm present&quot;
          content.body = &quot; Alarm \(second)&quot;
          content.sound = .default
          content.threadIdentifier = &quot;&quot;
          let trigger = UNTimeIntervalNotificationTrigger(timeInterval: TimeInterval(second) ,  repeats: false)
          second += 2
          let request = UNNotificationRequest(identifier: id, content: content, trigger: trigger)
          notification.add(request) { error in
              self.notification.removeAllDeliveredNotifications()
          }
      }
  }
  </code></pre>