title: How to get the remaining time of pending UNNotificationRequest?
body: <p>So far, after adding a <code>UNNotificationRequest</code> to the <code>UNUserNotificationCenter</code> that contains <code>UNTimeIntervalNotificationTrigger</code> (Here is the code that I implemented):</p>
  <pre><code>let center = UNUserNotificationCenter.current()
  center.requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in
      if granted {
          let content = UNMutableNotificationContent()
          center.delegate = self
          content.title = &quot;title&quot;
          content.body = &quot;body&quot;
          
          let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 10.0, repeats: false)
          let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
          center.add(request)
      }
  }
  </code></pre>
  <p>It works -fine- as it should, but what I need is to access the remaining time for firing the request trigger.</p>
  <p>For clarity, in my code snippet, I declared:</p>
  <p><code>let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 10.0, repeats: false)</code></p>
  <p>So, if I wait <strong>6</strong> seconds (starting from executing the above code snippet), the remaining time should be <strong>4</strong> seconds.</p>
  <p>Also, I tried to fetch the pending requests to check their triggers, as follows:</p>
  <pre><code>UNUserNotificationCenter.current().getPendingNotificationRequests(completionHandler: { requests in
       for request in requests {
           print(request.trigger)
       }
  })
  </code></pre>
  <p>but couldn't find the desired property in <a href="https://developer.apple.com/reference/usernotifications/unnotificationtrigger" rel="nofollow noreferrer">UNNotificationTrigger</a>.</p>
  <p>The question might be is there even a way to access it? and if it's not, what about a logical workaround to achieve it?</p>