title: How to get userInfo when user click in notification when app is closed?
body: <p>I'm doing an app that schedule local notifications and save an userInfo. That's part its ok.</p>
  
  <p>But when app is closed, Notification appear, but when user click, the method is not called and I can't handle userInfo.</p>
  
  <p>I saw that there's a new way to receive notification with <code>UNUserNotificationCenter</code>. But is not working too.</p>
  
  <p>That's my implementation in AppDelegate:</p>
  
  <pre><code>@available(iOS 10.0, *)
  func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -&gt; Void) {
  
      let lNotification = UILocalNotification()
      lNotification.userInfo = response.notification.request.content.userInfo
  
      applicationWorker.manage(localNotification: lNotification)
  }
  </code></pre>
  
  <p>Anyone to help me? I saw all the questions related here and didn't found anything.</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>If someone are looking for a solution, I added <code>UNUserNotificationCenter.current().delegate = self</code> in <code>didFinishLaunchingWithOptions</code> and it worked.</p>