-
Notifications
You must be signed in to change notification settings - Fork 30
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
Unable to Make Outgoing Calls Using Twilio Voice React Native SDK in Expo Managed Workflow #437
Comments
Thanks for reaching out. |
Hi @bobiechen-twilio |
Did you see any exception or did the promise not returning any error? |
@bobiechen-twilio I don’t see any exceptions, and the promise isn’t returning any errors. Here's the code I'm using for making the outbound call: `const makeCall = async () => {
} catch (error) { I reach the state where the log prints console.log('Starting call with number:', '**********'); but after that, nothing happens, and no errors are returned. |
Are you able to run the app from the Xcode debugger? At this point we might need the debug messages from the native ObjC layer in case something went wrong here. |
Exactly the same happening to me, I added the contactHandle prop as well since it says that it's required for iOS |
I was able to solve this by including this configuration in the app.json or app.config.js file:
|
@DiazIgnacio are you implementing it for React Native CLI or React Native Expo? |
@DiazIgnacio @bobiechen-twilio I added the following configuration to my React Native project: "ios": { Then I built the project using the command npx expo run:ios --configuration Debugt (Managed Flow). Issue: I successfully receive the Twilio token, and the call status moves to initiated, but nothing happens after that — the call remains in the connecting state. The logs confirm that the token is received and the call is initiated, but further events like connected or ringing do not trigger. LOG Starting call with TOKEN: <Encrypted_Token> Code used for initiating the call:
} else { Questions: |
Expo with a managed flow |
Are you running it in the simulator? Note that the twilio sdk doesn't work in the simulator. |
I have made build Expo with a managed flow |
Did you initialize the push registry from your voice instance?
Or are you managing the PushKit on your own? |
I’ve tried both with voice.initializePushRegistry() and without it, but the result is the same. Here’s the method I’m using to fetch the Twilio token: const fetchTwilioToken = async () => {
}; |
You may be right about the push registry, so for implementing only for outgoing calls I'd remove this two lines since they're not necessary:
|
@DiazIgnacio Maybe you have instructions on how to set up a React Native Expo App with the Twilio Voice SDK? |
Hi @ihorMarynichZazmic is this related to the new issue that you filed #442 ? |
I describe what problems I have on the frontend part of the application at this issue, and I describe what problems I have on the backend part of the application at #442. |
Description
I'm unable to make outgoing calls using Twilio Voice React Native SDK in Expo Managed Workflow. The following error appears when attempting to make a call:
Error: Failed to initialize PushKit device token
I'm currently focusing on outgoing calls only, but I plan to add support for incoming calls later.
Reproduction Steps
Generate Twilio Access Token using generateTwillioVoiceAccessToken.
Attempt to make an outgoing call using voice.connect().
The error message related to PushKit appears.
Expected Behavior
I expect outgoing calls to work without requiring PushKit initialization.
Actual Behavior
Outgoing calls fail due to PushKit initialization errors, despite not needing incoming calls functionality.
Reproduction Frequency
Occurs 100% of the time.
Software and Device Information
Device: iPhone 12
OS: iOS 16
React version: 18.2.0
React Native version: 0.74.3
Node version: 18.20.4
npm version: 9.6.7
Additional Context
I'm currently using the SDK only for outgoing calls. However, I plan to add incoming calls support in the future. How can I bypass PushKit initialization for now to enable outgoing calls only?
The text was updated successfully, but these errors were encountered: