title: App running in the background send local notifications
body: <p>How can i send Local Notifications while app is running in the background? in Swift 4. My app continuously use an Json file and I want the app to continue running  so that it sends the user a Local Notification. I want a if label = label2 in background, App push notification for user.</p>
  
  <pre><code> label.text = myString
      if label.text! == label2.text! {
  
              let content = UNMutableNotificationContent()
              content.title = "\(label2.text!)Değeri Kaydedildi!"
              content.body = "Değer döndüğünde haber verilecek."
              content.sound = UNNotificationSound.default()
  
              let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: 5, repeats: false)
  
              let request = UNNotificationRequest.init(identifier: "deneme", content: content, trigger: trigger)
  
              UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)
  
          }
  </code></pre>