在 iOS 14 中应用终止或终止时未收到 VoIP 通知

问题描述

在我的应用中, 这是 VoIP 呼叫的现有功能。一些用户向我报告说没有接听 VoIP 电话。我查了一下,发现报告的用户版本是ios 13或更高版本。

但我的一位朋友有 iPhone 6 plus (ios 12.5),因为我接到了 VoIP 电话。

ios 13 或更高版本保留了任何设置。

这是我的代码:

func pushRegistry(_ registry: PKPushRegistry,didReceiveIncomingPushWith payload: PKPushPayload,for type: PKPushType,completion: @escaping () -> Void) {
let provider1 = CXProvider(configuration: defaultConfig())
          provider1.setDelegate(self,queue: nil)
           let update = CXCallUpdate()
           update.supportsDTMF = true
           update.supportsHolding = true
           update.supportsGrouping = false
           update.supportsUngrouping = false
           update.hasVideo = false
  //  self.provider = provider1
           let bgTaskID = UIApplication.shared.beginBackgroundTask(expirationHandler: nil)
           DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()) {
           UIApplication.shared.endBackgroundTask(bgTaskID)
           }
          uuidneww = UUID()
           update.remoteHandle = CXHandle(type: .generic,value: "Calling")
    provider1.reportNewIncomingCall(with:uuidneww,update: update,completion: { error in })
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)