I am integrating Twilio Voice (v6.12.1) into my React Native app (utilizing Swift bridging for iOS) and have applied full VoIP, PushKit, and CallKit help for incoming calls.
✅ What works:
- Incoming calls set off the VoIP push and show the full-screen CallKit interface (or fallback UI).
- Decline Name works as anticipated.
- Name logs and occasions print appropriately.
❌ Drawback:
When I attempt to settle for the decision utilizing the CallKit Settle for button or React Native fallback UI, I constantly get:
❌ [TwilioVoiceModule] answerCall() callInvite is lacking
I additionally seen that the console logs for answerCall() are being printed thrice in a row, although the settle for button is barely pressed as soon as.
🔍 Observations:
- The
callInviteis correctly obtained when the VoIP push arrives. - However when
answerCall()is triggered,callInviteturns intonil. - This occurs in CallKit settle for, RN UI settle for, and even notification banner settle for.
📦 The way it’s arrange (summarized):
1. PushKit Registration – through PKPushRegistry in AppDelegate.swift
2. VoIP push dealing with – forwards payload to TwilioVoiceModule.handleIncomingPush()
3. CallKit integration – makes use of CXProviderDelegate to report and deal with settle for actions
4. JS Bridge – emits acceptCallAction to JS
5. React Native calls TwilioVoiceModule.answerCall(uuid, callSid)
6. In answerCall() methodology: self.callInvite is nil – so name can’t be accepted.
Attaching the hyperlink to view the related code: https://docs.google.com/doc/d/15pNjKrfk954OaotpMIEh3xQUtst—1K45DBXoYctGM/edit?usp=sharing
💡 Name Settle for Movement (iOS):
- VoIP Push →
TwilioVoiceModule.handleIncomingPush() - Twilio SDK creates
callInvite reportNewIncomingCall()triggers CallKit UI- On settle for:
CXAnswerCallAction→ emits occasion to JS - RN calls
TwilioVoiceModule.answerCall(uuid, callSid) - Drawback:
callInviteis already nil
❓ What I am making an attempt to grasp:
- Why is callInvite lacking when accepting the decision, and the way can I be certain answerCall() is triggered solely as soon as?
💬 Any assist could be appreciated.
📱 Atmosphere:
- React Native 0.78.x
- iOS 17+
- Swift bridging with
TwilioVoiceModule.swift - Twilio Voice SDK 6.12.1
- PushKit + CallKit +
react-native-callkeep

