Hello,
In production, a large number of users experience outgoing call reporting fails with the following error:
com.apple.CallKit.error.requesttransaction Code=2
The iOS version doesn't matter, errors are present in v15-26
Details
- My
CXProvider
held as a global singleton, so it’s unlikely to be deinited. - There is no explicit call to CXProvider.invalidate() in the app.
If I manually invalidate the CXProvider
, I observe the expected failure when trying to create an outgoing call (com.apple.CallKit.error.requesttransaction error 2
).
However, If I recreate the CXProvider
after the error, outgoing calls are reported correctly.
Many users trigger the providerDidReset
delegate method (CXProviderDelegate
) before this error.
According to the documentation, providerDidReset
can be called by the system, and we are supposed to end all active calls, but the documentation doesn't suggest recreating the CXProvider
.
Question
Should I recreate CXProvider
after providerDidReset
and forget about that, or could this error be caused by something else?