title: Why is userInfo not present when user clicks notification?
body: <p>I use the following function to display notifications (that part works).</p>
  <pre class="lang-swift prettyprint-override"><code>func showNotification(_ body: String, _ config: Config){
    let content = UNMutableNotificationContent()
    content.body = body
    content.userInfo = [&quot;logFile&quot;: config.logFile]
    let request = UNNotificationRequest(
      identifier: UUID().uuidString,
      content: content,
      trigger: nil
    )
    UNUserNotificationCenter.current().add(request) { (error:Error?) in
      if error != nil {
        print(error?.localizedDescription ?? &quot;Could not add notification&quot;)
      }
    }
  }
  </code></pre>
  <p>When the app is not running and a user clicks on a notification in the notification center, I use the following function to try to get <code>userInfo</code>, but the property is not present.</p>
  <pre class="lang-swift prettyprint-override"><code>func applicationDidFinishLaunching(_ notification: Notification) {
    DispatchQueue.main.async {
      let alert = NSAlert.init()
      alert.messageText = String(describing: notification.userInfo)
      alert.runModal()
    }
  }
  </code></pre>
  <p>Why?</p>