Ios CXCallObserver-后台监控

Ios CXCallObserver-后台监控,ios,callkit,Ios,Callkit,由于某些设备和BLE的限制,我需要在我的应用程序中进行监控,当用户在电话上时,该应用程序与BLE进行交互。我已经编写了一个基本的call observer进行测试,但是当应用程序处于后台时,它不会收到任何更新。我想知道是否有人知道如何在后台获取呼叫状态通知 class ViewController: UIViewController{ @IBOutlet weak var callStatusLabel: UILabel! var callObs : CXCallObserver

由于某些设备和BLE的限制,我需要在我的应用程序中进行监控,当用户在电话上时,该应用程序与BLE进行交互。我已经编写了一个基本的call observer进行测试,但是当应用程序处于后台时,它不会收到任何更新。我想知道是否有人知道如何在后台获取呼叫状态通知

class ViewController: UIViewController{  
  @IBOutlet weak var callStatusLabel: UILabel!  
  var callObs : CXCallObserver!  

  override func viewDidLoad() {  
    super.viewDidLoad()  
    /  
    callObs = CXCallObserver()  
    callObs.setDelegate(self, queue: nil)  
    print("Monitoring Calls")  
    callStatusLabel.text = "Monitoring..."  
    self.view.backgroundColor = UIColor.yellow  
  }  
  override func didReceiveMemoryWarning() {  
    super.didReceiveMemoryWarning()  
    /  
  }  

}  
extension ViewController : CXCallObserverDelegate  
{  
  func callObserver(_: CXCallObserver, callChanged: CXCall)  
  {  
    if(callChanged.hasEnded)  
    {  
      print("Call Ended")  
      callStatusLabel.text = "Call Ended"  
      self.view.backgroundColor = UIColor.green  
    }  
    else if(callChanged.hasConnected)  
    {  
      print("Call Connected")  
      callStatusLabel.text = "Call Connected"  
      self.view.backgroundColor = UIColor.red  
    }  
  }  
}  
我目前已启用以下后台模式: 音频、AirPlay和PIP Loc更新 网络电话 外部附件通信 使用BLE
背景提取

你解决了这个问题吗,我有完全相同的问题?你解决了这个问题吗,我有完全相同的问题?