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

Multiple issues regarding incoming calls on iOS #419

Open
3 tasks done
bojandurmic opened this issue Sep 2, 2024 · 4 comments
Open
3 tasks done

Multiple issues regarding incoming calls on iOS #419

bojandurmic opened this issue Sep 2, 2024 · 4 comments

Comments

@bojandurmic
Copy link

Issue

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

We are facing several issues related to incoming calls on iOS. I have taken some screenshots to help explain the issues we're facing.

Per instructions in one of the previous issues and following an example set by the example app, we are doing the following when the app starts:

  1. Register with a Twilio token.
  2. Once a token is registered, retrieve all calls and call invites from the voice object.
  3. Update caller handle by using callInvite.updateCallerHandle method.
  4. Save calls and call invites in state to be handled by our app.

This mostly works fine, though we noticed a set of issues that occurs when the app is force closed and an incoming call is made.

  1. When we receive an incoming call, caller handle is not updated in the smaller banner notification. It only gets updated when you tap on a banner and see a notification in full screen.. Please see the images:

IMG_2438
IMG_2439

This will only happen if the app is force closed. If the app is open and in background, it all works fine.

  1. When you answer the call in this state, the app launches in light mode.

Our app is configured to use the device's color theme (light/dark mode). We are using React Native's useColorScheme to determine the theme. When the app is force closed and you accept an incoming call, the app launches in light mode, even though the device is in dark mode.

  1. Despite setting callKitIncludesCallsInRecents: false,, we still sometimes see entries in call log.

Once again, it is most likely related to incoming calls in closed state. It doesn't happen when we receive a call when the app is open.

Reproduction Steps

  1. Force close the app, but don't lock the phone
  2. Have someone call you

Expected Behavior

Since our app is calling updateCallerHandle, you should see the handle we set in both notification banner and when you tap on it.

Also, the app should launch in the mode that user's device uses, not light mode.

Actual Behavior

You only see the updated caller handle when you tap on a little notification banner. The app launches in light mode, regardless of device setting.

Reproduction Frequency

It always happens when the app is in closed state

Software and Device Information

Please complete the following information.

  • Device: iPhone 14 Pro Max and iPhone 15 Pro
  • OS: iOS 17
  • React version: 18
  • React Native version: 0.74.5

Additional Context

It would be EXTREMELY helpful for us, if the app on the native side would look for displayName or similar parameter to set a default caller handle. Even with updateCallerHandle function, it is still cumbersome to have us on the client side do getCustomParameters() to find displayName and then set it. Also, because this is having on a React Native layer, you have a small delay before a phone number changes to a caller name, which would be instant if the Twilio's native layer looked for displayName in call params.

@bojandurmic bojandurmic changed the title Multiple issues regarding incoming calls on iOS" Multiple issues regarding incoming calls on iOS Sep 2, 2024
@mhuynh5757
Copy link
Collaborator

Hi @bojandurmic we're aware that there's a gap with the caller handle API and we're investigating a solution that works for everyone. It seems like the displayName feature that we removed when going GA was quite popular, I'll be sure to inform the team.

@bojandurmic
Copy link
Author

Hi @mhuynh5757 , thanks for your reply. Would you mind sharing the reason why displayName was removed?

Also, can you test if accepting an incoming call while the app is force closed causes your app to start in light color mode instead of automatic based on device settings?

@bojandurmic
Copy link
Author

bojandurmic commented Sep 6, 2024

@mhuynh5757 adding more details: it seems like, when the app is opened from a closed state by an incoming call, Appearance.getColorScheme() and useColorScheme from React Native always returns light instead of the proper device setting, which should be dark in my case.

Do you know if there is any piece of code from the Twilio RN SDK or Twilio iOS SDK that could be causing this? Also, can you see if you can reproduce this on your reference app? Thanks!

@mbrunelli
Copy link

@mhuynh5757 Any details on this? We're still occasionally seeing call logs show up in the native iOS phone app.

3. Despite setting callKitIncludesCallsInRecents: false,, we still sometimes see entries in call log.

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