title: UNUserNotificationCenter don't work when app is killed
body: <p>I just did change for my notification for iOs 10 and others:</p>
  
  <pre><code>if #available(iOS 10.0, *) {
      let center = UNUserNotificationCenter.current()
      center.requestAuthorization(options: [.alert, .sound]) { (granted, error) in
  
          let content = UNMutableNotificationContent()
  
          content.body = notifMessage!
          content.sound = UNNotificationSound.default()
          // Deliver the notification in five seconds.
          let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: 5, repeats: false)
          let request = UNNotificationRequest.init(identifier: "Upload", content: content, trigger: trigger)
  
          // Schedule the notification.
          let center = UNUserNotificationCenter.current()
          center.add(request)
      }
  } else {
      let notification = UILocalNotification()
      notification.alertBody = notifMessage
      notification.fireDate = NSDate() as Date
      notification.soundName = UILocalNotificationDefaultSoundName
      UIApplication.shared.scheduleLocalNotification(notification)
  }
  </code></pre>
  
  <p>When I run my apps on my device by connect it with the USB it works, but only when the app is in background, it doesn't work when:</p>
  
  <ul>
  <li><p>i kill the app</p></li>
  <li><p>when the app is displayed</p></li>
  </ul>