0
나는 voip 호출을 구현하기 위해 callkit & 푸시 키트를 사용하고 있습니다.수신 전화의 UUID를 가져올 수 없습니다.
호출하려면,이 코드입니다
callManager?.startCall(handle: String(format: "%@", "Jane Doe"), video: false)
임은 물론 있지만에 VoIP를 푸시을 받고, 내가 수신기의 UUID를받지 못했습니다 호출 할 수 있도록 그것을 얻을 수있는 방법이있다 받았습니다.
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, forType type: PKPushType) {
guard type == .voIP else { return }
print("\(#function) incoming voip notfication: \(payload.dictionaryPayload)")
let uuidString = payload.dictionaryPayload["UUID"] as? String {
let uuid = UUID(uuidString: uuidString)
print(uuid) // this is always nil
let backgroundTaskIdentifier = UIApplication.shared.beginBackgroundTask(expirationHandler: nil)
self.displayIncomingCall(uuid: uuid, handle: "Jane Doe"", hasVideo: false) { _ in
UIApplication.shared.endBackgroundTask(backgroundTaskIdentifier)
}
}
}
이는 VoIP를 푸시의 세부 사항을 제공 할 수 있도록 우리는 서버에 뭔가를 보낼 필요가 있는가에 잘못하고 무엇 메신저 날 지점하시기 바랍니다.