title: How do I decide which window to open Notification Settings in on iOS 13 for userNotificationCenter:openSettingsFor:?
body: <p>iOS has the following method that gets called so you can offer custom notification settings to a user through Notification Center or the Settings app:</p>
  
  <pre><code>func userNotificationCenter(_ center: UNUserNotificationCenter, openSettingsFor notification: UNNotification?) {
      // Open up a Settings view controller within your app or something        
  }
  </code></pre>
  
  <p>In it you would open up some in-app settings view controller.</p>
  
  <p>On iOS 12 this was easy, find the active window, find the rootViewController and toss the settings screen on top of it.</p>
  
  <p>On iOS 13 you (can) have multiple windows, so I'm assuming this method could get called on any of them?</p>
  
  <p>Say you have 5 windows of your app open in the background, then you open the Settings app and request your app's notification settings. Which window does it use? How would I know which window/view controller to add the settings screen on to? I wouldn't want to choose one at random and accidentally add it to one in the background and not the one that was opened.</p>
  
  <p><code>UNNotificationResponse</code> on the other hand <em>does</em> have a <code>targetScene</code> method so if your app is opened from a notification you can know which window to use, but this method seemingly lacks it.</p>
  
  <p>Should I just iterate over the all the window scenes available to the app and find one in the foreground?</p>