title: How do I respond to a tap on a UNUserNotification?
body: <p>I'm using the new <code>UNUserNotification</code> framework in iOS 10. I can see how to add action buttons, but how do I respond when the user taps the notification itself? In my case, it will be an image with some text.</p>
  
  <p>The default behavior is that the application opens.</p>
  
  <ol>
  <li><p>Can I have custom code that detects if my application is being opened because of a <code>UNUserNotification</code> tap, and ideally with identifier information about the notification tapped?</p></li>
  <li><p>Will these work if my app is running in the background or closed? <code>UNUserNotification</code> documentation suggests setting the delegate of <code>UNUserNotificationCenter</code>, but I think this only works if the app is running.</p></li>
  </ol>