FG
📱 Mobile & Cross-PlatformExpo

Xcode 16.3 and SDK 52 / React Native 0.76

Freshabout 21 hours ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Update April 3, 2025 from @brentvatne This issue is resolved. See: https://github.com/expo/expo/issues/35807#issuecomment-2776278963 <hr /> Summary After updating Xcode, running a React Native with expo app results in a build error. First, there’s a warning about a Hermes script that runs during every build because it doesn’t specify output dependencies. Then, while compiling some files, an error occurs in string_view:300:42, related to the instantiation of an undefined template (std::char_traits<unsigned char>). This seems to be caused by an incompatibility between the Xcode version, the iOS SDK, and React Native libraries. [code block] What platform(s) does this occur on? iOS SDK Version 52.0.18 Environment [code block] Minimal reproducible example npx expo install expo-dev-client npx expo prebuild npx expo run:ios

Error Output

error occurs in string_view:300:42, related to the instantiation of an undefined template (std::char_traits<unsigned char>). This seems to be caused by an incompatibility between the Xcode version, the iOS 

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix Hermes Script Warning and Compilation Error in React Native with Xcode 16.3

Medium Risk

The build error is caused by an incompatibility between the Xcode version (16.3), the iOS SDK (52.0.18), and the React Native libraries. Specifically, the Hermes script does not specify output dependencies, leading to warnings, and the compilation error in string_view is due to an undefined template instantiation, which can occur if the C++ standard library is not properly configured or if there are mismatched versions of the libraries being used.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Update React Native and Expo SDK

    Ensure that you are using the latest compatible versions of React Native and Expo SDK that support Xcode 16.3. Run the following command to update your packages.

    bash
    npx expo install react-native@latest expo@latest
  2. 2

    Modify Hermes Configuration

    Edit the `metro.config.js` file to specify output dependencies for the Hermes script. This will help eliminate the warning during the build process.

    javascript
    module.exports = { transformer: { babelTransformerPath: require.resolve('react-native-hermes-compiler') }, };
  3. 3

    Clean Build Folder

    Before rebuilding the project, clean the build folder in Xcode to remove any cached files that might be causing issues. Open Xcode, go to 'Product' in the menu, and select 'Clean Build Folder'. Alternatively, you can run the command below.

    bash
    npx react-native clean
  4. 4

    Rebuild the Project

    After updating the dependencies and cleaning the build folder, rebuild the project using the following command to ensure all changes take effect.

    bash
    npx expo run:ios
  5. 5

    Verify C++ Standard Library Configuration

    Ensure that your project is configured to use the correct C++ standard library. Open your Xcode project settings, navigate to 'Build Settings', and set 'C++ Language Dialect' and 'C++ Standard Library' to 'C++14' or 'C++17' as required.

    N/A
    N/A

Validation

To confirm the fix worked, run the command 'npx expo run:ios' and check that the build completes without warnings or errors. Additionally, verify that the Hermes script warning no longer appears in the build logs.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

exporeact-nativemobileiosissue-accepted