Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS] If app is in killed state, How to accept or reject incoming call in IOS? #405

Open
3 tasks
himanshupkarak opened this issue Aug 21, 2024 · 6 comments
Open
3 tasks

Comments

@himanshupkarak
Copy link

Issue

Accept and Reject buttons are not working, If received an incoming call on killed state in IOS

Pre-submission Checklist

  • I have verified that the issue occurs with the latest release and is not marked as a known issue in the CHANGELOG.md.
  • I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Description

accept and reject not working for killed state incoming call in IOS.

Reproduction Steps

Expected Behavior

User can accept or reject incoming call from IOS native UI screen.

Actual Behavior

can not accept or reject

Reproduction Frequency

In my case, It's 100%

Screenshots

Software and Device Information

Please complete the following information.

  • Device: [Phone 14]
  • OS: [iOS 17]
  • React version: [18.2.0]
  • React Native version: [0.72.10]
  • Node version: [18.20.3]
  • npm version: [10.7.0]

Additional Context

@mhuynh5757
Copy link
Collaborator

Hi @himanshupkarak are you experiencing crashes or are you not seeing UI pop up when attempting to receive an incoming call? Are you able to receive incoming calls when the app is not in the killed state? If you experiencing crashes, please provide Xcode logs. Finally, can you confirm that you're using a real iOS device, and not the iOS simulator? The Twilio Voice SDKs will not work on iOS simulators.

@himanshupkarak
Copy link
Author

HI @mhuynh5757 i am not experiencing any crash on incoming call with any state (foreground, background or killed) not even after accepting or rejecting call.

the issue is (only for killed state), when i click on accept (from IOS native UI) my call decline if i click on reject (2 times), my call also decline

*here are some screenshots to understand more.

WhatsApp Image 2024-08-22 at 14 16 24
WhatsApp Image 2024-08-22 at 14 16 29

one more thing,

-> voice.addListener(Voice.Event.CallInvite, handlePendingCallInvite);

  • for foreground state and background state above addListener works perfectly fine. 👍🏻 but for killed state, when clicked on accept button and my app opens, above addListener is not working ❌ so i am not able to see any console.log and not able to run below Listner.

-> callInvite.on(CallInvite.Event.Accepted, async (res) => {
console.log('check response', res)
})


  • I think, May be i missing something in appDelegate.mm file.

please help!!

@himanshupkarak
Copy link
Author

yes, I am using a real iOS device

@mhuynh5757
Copy link
Collaborator

Thanks for the update @himanshupkarak. When CallInvites are accepted through the native UI and the JS runtime is not started, for example when your app is backgrounded or closed, you are indeed correct that the callInvite.on(CallInvite.Event.Accepted, ...) event will not fire. Instead, on JS runtime start, you should invoke voice.getCalls() to get all ongoing calls. Please see how our test app does this: https://github.com/twilio/twilio-voice-react-native/blob/main/test/app/src/hook.ts#L479

@ayazalphasquad
Copy link

hi @mhuynh5757 - I'm facing a similar issue with my app in the killed state. I've integrated the react-native-callkeep package along with PushKit and CallKit to handle the UI, and it works fine in the foreground and background modes. But, when the app is killed, it crashes because the listeners are in the JavaScript layer.

I am unable to view the Xcode console logs since the app disconnects with the xCode as soon as it's terminated/killed. Could you please assist me with this issue?

Hi @himanshupkarak - Response from your side would also be appreciated.

@himanshupkarak
Copy link
Author

Hi @ayazalphasquad, I will let you know, BTW i am still having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants