Closed greenraze13 closed 3 months ago
Hi @greenraze13
The message NSInternalInconsistencyException: Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push.
indicates that the component that handles the iOS PushKit events might not be instantiated to report the VoIP push notification to the iOS CallKit framework as an incoming call.
Is your application calling the Voice.initializePushRegistry() method or handles the PushKit events in a different module?
Hi @bobiechen-twilio
Thanks for your response. I am calling await voice.initializePushRegistry() function like below
This is useVoice hook.
React.useEffect(() => { voice.getVersion().then(setSdkVersion); const bootstrap = async () => { if (Platform.OS === 'ios') { await voice.initializePushRegistry(); } const calls = await voice.getCalls(); for (const call of calls.values()) { console.log('existing call', call.getCustomParameters()); callHandler(call); } const callInvites = await voice.getCallInvites(); for (const callInvite of callInvites.values()) { console.log('existing call invite', callInvite.getCustomParameters()); callInviteHandler(callInvite); } }; bootstrap(); voice.on(Voice.Event.CallInvite, callInviteHandler); voice.on(Voice.Event.AudioDevicesUpdated, audioDevicesUpdateHandler); return () => { voice.off(Voice.Event.CallInvite, callInviteHandler); voice.off(Voice.Event.AudioDevicesUpdated, audioDevicesUpdateHandler); }; }, [ audioDevicesUpdateHandler, callHandler, callInviteHandler, voice, ]);
Hi @bobiechen-twilio Any update here ?
Hi @greenraze13
Have you tried the example app with your environment? The example app is able to receive incoming calls when the app was previously terminated
@bobiechen-twilio Hi Thanks .I have tried that its working fine now.
Glad to see it's working for you now @greenraze13 Is it possible for you to share the fix you did in your app so the terminated app is able to wake up and handle the incoming call?
@bobiechen-twilio Yes in killed state App is working fine and now every time and its receiving calls The thing is now I awaking this await voice.initializePushRegistry() in App.tsx file.
Issue
Pre-submission Checklist
Description
I am testing calls from Android to iOS. The call is received on the iPhone while in the foreground and background. However, after some calls, it stops working in the app's killed state on the iPhone. I delete the app from the iPhone and then reinstall it. The call works fine again on the iPhone in the killed state, but after some calls, no call is received in the app's killed state. The call always works fine in the foreground. In xcode project in sigining and capbilities background modes on for Voip.That why app works fine for a while. I have integrated the sentry Where received error related to voip NSInternalInconsistencyException: Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push.
Reproduction Steps
Expected Behavior
Iphone app should receive the call while in killed state every time
Actual Behavior
On start of testing call from android to iphone app worked fine on both fore ground and killed state. But after some times / some calls iphone app is not receiving the calls while in killed state.
Reproduction Frequency
Issue can be produce by calling multiple times from android to iphone.Pick some calls and after some times iphone app will stop works while app is in killed state.
Software and Device Information
Please complete the following information.
Receiving device iPhone 15 with ios version 17+. "react-native": "0.72.6",
With yarn twilio-voice-react-native@1.0.0