Conversation
luisrivas
left a comment
There was a problem hiding this comment.
The Expo path seems solid, but getExpoVersion() returns undefined in bare RN apps and gets marshaled to null by the native bridge. I'd recommend adding a test for this case and implementing native handling if needed.
There was a problem hiding this comment.
Pull request overview
This PR updates the Twilio Voice native SDK versions and adjusts the React Native/Expo bridge logic to support “Expo insights”, including removing/normalizing some platform-specific shims in PreflightTest parsing.
Changes:
- Bump native SDK dependencies (iOS CocoaPods + Android Gradle).
- Add Expo SDK version detection in JS and propagate it to native via a new
voice_setExpoVersionAPI. - Simplify PreflightTest report parsing by removing platform-specific key/value shimming paths and updating tests accordingly.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| twilio-voice-react-native.podspec | Bumps TwilioVoice iOS dependency version. |
| android/build.gradle | Bumps Twilio Voice Android dependency version. |
| src/utility/expoVersion.ts | Adds Expo SDK version extraction from global.expo manifest. |
| src/common.ts | Re-exports getExpoVersion for use across the library. |
| src/Voice.tsx | Calls new native API voice_setExpoVersion(...) during Voice construction. |
| src/type/NativeModule.ts | Adds the voice_setExpoVersion method to the TS native module interface. |
| ios/TwilioVoiceReactNative.m | Implements voice_setExpoVersion on iOS via setenv. |
| android/.../VoiceModuleProxy.java | Implements setExpoVersion on Android via System.setProperty. |
| android/.../TwilioVoiceReactNativeModule.java | Exposes voice_setExpoVersion via the RN bridge. |
| android/.../ExpoModule.kt | Exposes voice_setExpoVersion via the Expo module interface. |
| android/.../Constants.java | Adds EXPO_VERSION key constant. |
| src/PreflightTest.ts | Removes platform-specific parsing branches for call quality / TURN requirement. |
| src/tests/PreflightTest.test.ts | Updates tests to match the simplified parsing expectations. |
| src/tests/Voice.test.ts | Adds a test asserting Expo version is set during construction. |
| src/tests/expoVersion.test.ts | Adds unit tests for getExpoVersion. |
| src/mocks/common.ts | Adds mocks for voice_setExpoVersion and getExpoVersion. |
| ios/TwilioVoiceReactNative+PreflightTest.m | Fixes a delegate method name typo (didCompleteWithReport). |
| test/expo/detox/scripts/patch-all.bash | Adds a log line to clarify patching step. |
| .circleci/config.yml | Ensures Detox patching runs after Android prebuild in CI. |
Comments suppressed due to low confidence (1)
src/PreflightTest.ts:616
- The error message for an unmapped call quality is misleading: at this point
nativeCallQualityis already known to be a string, so "Expected a string" doesn't describe the failure. Consider including the allowed values (e.g., map keys) in the message so debugging invalid native values is easier.
const parsedCallQuality = callQualityMap.get(nativeCallQuality);
if (typeof parsedCallQuality !== 'string') {
throw new InvalidStateError(
`Call quality invalid. Expected a string, found "${nativeCallQuality}".`
);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
android/src/main/java/com/twiliovoicereactnative/VoiceModuleProxy.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/twiliovoicereactnative/TwilioVoiceReactNativeModule.java
Show resolved
Hide resolved
bobiechen-twilio
left a comment
There was a problem hiding this comment.
iOS part looks good
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/PreflightTest.ts:616
- The error message when
nativeCallQualityis a string but not one of the supported values is misleading: the code already validated the type isstring, but the thrown message says it “Expected a string”. Consider including the allowed values (e.g., the keys ofcallQualityMap) in the message so debugging invalid native payloads is clearer.
if (typeof parsedCallQuality !== 'string') {
throw new InvalidStateError(
`Call quality invalid. Expected a string, found "${nativeCallQuality}".`
);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…t for bare RN app Agent-Logs-Url: https://github.com/twilio/twilio-voice-react-native/sessions/48570989-0293-4824-aa9f-19f79c308dfb Co-authored-by: luisrivas <2474521+luisrivas@users.noreply.github.com>
Added a test in b090084 that verifies Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
mhuynh5757
left a comment
There was a problem hiding this comment.
Reviewed the above commits, looks good so far. Going to test locally at this point.
Submission Checklist
CHANGELOG.mdto reflect any feature, bug fixes, or known issues made in the source codeFiles changedtab prior to submitting the pull request for review to ensure proper usage of the style guideDescription
This PR pulls the latest versions of the native iOS and Android SDKs. This PR also updates/removes the shimming that we did for some differently named keys in the PreflightTest reports.
Breakdown
Validation
Additional Notes
N/A