Skip to content

[VBLOCKS-5991] Expo insights#675

Open
mhuynh5757 wants to merge 7 commits intomainfrom
task/expo-insights_pull-latest-native-releases
Open

[VBLOCKS-5991] Expo insights#675
mhuynh5757 wants to merge 7 commits intomainfrom
task/expo-insights_pull-latest-native-releases

Conversation

@mhuynh5757
Copy link
Copy Markdown
Collaborator

Submission Checklist

  • Updated the CHANGELOG.md to reflect any feature, bug fixes, or known issues made in the source code
  • Tested code changes and observed expected behavior in the example app
  • Performed a visual inspection of the Files changed tab prior to submitting the pull request for review to ensure proper usage of the style guide

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Description

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

  • Pull latest versions of the native iOS and Android SDKs.
  • Remove shimming of PreflightTest report keys.

Validation

  • Integration tests passing.
  • Local tests passing.

Additional Notes

N/A

Copy link
Copy Markdown

@luisrivas luisrivas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_setExpoVersion API.
  • 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 nativeCallQuality is 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.

Copy link
Copy Markdown
Collaborator

@bobiechen-twilio bobiechen-twilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS part looks good

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 nativeCallQuality is a string but not one of the supported values is misleading: the code already validated the type is string, but the thrown message says it “Expected a string”. Consider including the allowed values (e.g., the keys of callQualityMap) 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Copilot AI commented Apr 10, 2026

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 nati...

Added a test in b090084 that verifies voice_setExpoVersion is called with undefined when getExpoVersion() returns undefined (bare RN app). The native layers already handle null/undefined gracefully, so the call still goes through rather than being skipped.

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:

  • github.com (HTTP Only)
    • Triggering command: /usr/bin/ssh ssh -o BatchMode=yes -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack '/twilio/api-documenter.git' (packet block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown
Collaborator Author

@mhuynh5757 mhuynh5757 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the above commits, looks good so far. Going to test locally at this point.

Copy link
Copy Markdown

@luisrivas luisrivas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mhuynh5757 !

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

Successfully merging this pull request may close these issues.

6 participants