I have the same issue, didStartRinging
is not called cause App is killed before that method is called.
If I report the incoming call in the completion block of SendbirdCall.pushRegistry() the app is crashing, like in the Quickstart Code Sample.
But if I do it outside the completion block the app is not crashing, but I’m not sure how to proceed here.
// This is crashing
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) {
SendBirdCall.pushRegistry(registry, didReceiveIncomingPushWith: payload, for: type) { uuid in
SendBirdCall.pushRegistry(registry, didReceiveIncomingPushWith: payload, for: type) { uuid in
guard uuid != nil else {
let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .generic, value: "invalid")
let randomUUID = UUID()
CXCallManager.shared.reportIncomingCall(with: randomUUID, update: update) { _ in
CXCallManager.shared.endCall(for: randomUUID, endedAt: Date(), reason: .acceptFailed)
}
completion()
return
}
completion()
}
}
// This is working but then I have no UUID from Sendbird
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) {
let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .generic, value: "Test")
CXCallManager.shared.reportIncomingCall(with: UUID(), update: update)
completion()
}
iOS13 SDK
Also researched here in the Apple forum
https://developer.apple.com/forums/thread/118607?page=2
Seems like CallSDK can’t work with Xcode 11 and iOS13 SDK, cause the behaviour change or requirements of PushKit