twilio / twilio-voice-react-native

Other
72 stars 27 forks source link

iOS: Incoming call is not received when the app is terminated (killed state) #379

Closed manpreetaj closed 3 months ago

manpreetaj commented 3 months ago

Issue

Incoming calls are not received when the application is not running (killed state). However, I can receive and answer calls when the app is in the active or background state.

Pre-submission Checklist

Description

Calling the Voice.initializePushRegistry() method as soon as the Voice module is initialized as follows for iOS:

const voice = new Voice();
  await voice.initializePushRegistry(); 

  //Then registering accessToken
  await voice.register(accessToken)

SDK version: @twilio/voice-react-native-sdk": "^1.0.0"

Reproduction Steps

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

Incoming call must be shown when application is not running.

Actual Behavior

When trying to receive an incoming call while the app is in the killed state, the React Native console log shows : BUNDLE ./index.js

But no further information is shown.

Reproduction Frequency

Is the reproducibility of the issue deterministic? If not, what percentage of the time does the issue occur? In how many attempts was the issue observed?

Screenshots

If applicable, add screenshots to help explain your problem.

Software and Device Information

Please complete the following information.

Additional Context

bobiechen-twilio commented 3 months ago

HI @manpreetaj

Thanks for reaching out. You haven't provided any Twilio Call SID but based on the description very likely your app has the same symptom as this issue: https://github.com/twilio/twilio-voice-react-native/issues/369 Please check out the example app of the repo and make sure your app handles the iOS push-registry initialization at launch.

manpreetaj commented 3 months ago

Hi @bobiechen-twilio Thanks for your response.

Yes, my app handles the iOS push-registry initialization at launch (in app.tsx file).

Now, I tested my app on an iPhone 11 with iOS version 17.5.1, and incoming calls are working fine even when the app is in the killed state. I noticed that the issue was only with iOS 15.7.9 on an iPhone 7 Plus.

Thanks