react-native: Xcode 16.3 and undefined template 'std::char_traits' prevent building the app

Description

Xcode 16.3 removes the base template for std::char_traits: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes

This prevents to build iOS app with new Xcode 16.3.

Steps to reproduce

Try to build app with Xcode 16.3

React Native Version

0.76.8

Affected Platforms

Build - iOS

Output of npx @react-native-community/cli info

Not needed

Stacktrace or Logs

Not needed

Reproducer

https://github.com/react-native-community/rn-diff-purge/tree/release/0.76.8

Screenshots and Videos

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 141
  • Comments: 100 (5 by maintainers)

Most upvoted comments

In case someone needs to downgrade Xcode (manually), here’s how to:

📦 How to Downgrade Xcode from 16.3 to 16.2

If you need to downgrade Xcode for compatibility or stability reasons, here’s a step-by-step guide to go from Xcode 16.3 to 16.2.


🧹 1. Remove or Rename Xcode 16.3

You can’t have two versions of Xcode named Xcode.app in /Applications, so either delete or rename the current version.

🔥 Delete Xcode 16.3

sudo rm -rf /Applications/Xcode.app

💾 OR Rename It (if you want to keep it)

sudo mv /Applications/Xcode.app /Applications/Xcode-16.3.app

📥 2. Download Xcode 16.2

Go to the official Apple Developer Downloads page:

🔗 https://developer.apple.com/download/all/

  • Sign in with your Apple ID.
  • Search for “Xcode 16.2”.
  • Download the .xip archive (approx. 12GB).

📦 3. Install Xcode 16.2

Once downloaded:

  1. Double-click the .xip to extract Xcode.app.
  2. Move the extracted app to your Applications folder:
sudo mv ~/Downloads/Xcode.app /Applications/

✅ 4. Set Xcode 16.2 as the Active Version

Use xcode-select to make sure your system points to the correct Xcode version:

sudo xcode-select -s /Applications/Xcode.app

Then verify:

xcodebuild -version

Expected output:

Xcode 16.2
Build version 16Cxxx

In case someone needs to downgrade Xcode (manually), here’s how to:

📦 How to Downgrade Xcode from 16.3 to 16.2

If you need to downgrade Xcode for compatibility or stability reasons, here’s a step-by-step guide to go from Xcode 16.3 to 16.2.

🧹 1. Remove or Rename Xcode 16.3

You can’t have two versions of Xcode named Xcode.app in /Applications, so either delete or rename the current version.

🔥 Delete Xcode 16.3

sudo rm -rf /Applications/Xcode.app

💾 OR Rename It (if you want to keep it)

sudo mv /Applications/Xcode.app /Applications/Xcode-16.3.app

📥 2. Download Xcode 16.2

Go to the official Apple Developer Downloads page:

🔗 https://developer.apple.com/download/all/

  • Sign in with your Apple ID.
  • Search for “Xcode 16.2”.
  • Download the .xip archive (approx. 12GB).

📦 3. Install Xcode 16.2

Once downloaded:

  1. Double-click the .xip to extract Xcode.app.
  2. Move the extracted app to your Applications folder:

sudo mv ~/Downloads/Xcode.app /Applications/

✅ 4. Set Xcode 16.2 as the Active Version

Use xcode-select to make sure your system points to the correct Xcode version:

sudo xcode-select -s /Applications/Xcode.app Then verify:

xcodebuild -version Expected output:

Xcode 16.2
Build version 16Cxxx

You can also just download the old Xcode version, rename it to Xcode_16.2 or something you want, place it into the Applications folder. And then open the Xcode 16.3, got to Settings -> Locations and you will be able to select the version you want for Command Line Tools.

Image

In case someone needs to downgrade Xcode (manually), here’s how to:

📦 How to Downgrade Xcode from 16.3 to 16.2

If you need to downgrade Xcode for compatibility or stability reasons, here’s a step-by-step guide to go from Xcode 16.3 to 16.2.

🧹 1. Remove or Rename Xcode 16.3

You can’t have two versions of Xcode named Xcode.app in /Applications, so either delete or rename the current version.

🔥 Delete Xcode 16.3

sudo rm -rf /Applications/Xcode.app

💾 OR Rename It (if you want to keep it)

sudo mv /Applications/Xcode.app /Applications/Xcode-16.3.app

📥 2. Download Xcode 16.2

Go to the official Apple Developer Downloads page:

🔗 https://developer.apple.com/download/all/

  • Sign in with your Apple ID.
  • Search for “Xcode 16.2”.
  • Download the .xip archive (approx. 12GB).

📦 3. Install Xcode 16.2

Once downloaded:

  1. Double-click the .xip to extract Xcode.app.
  2. Move the extracted app to your Applications folder:

sudo mv ~/Downloads/Xcode.app /Applications/

✅ 4. Set Xcode 16.2 as the Active Version

Use xcode-select to make sure your system points to the correct Xcode version:

sudo xcode-select -s /Applications/Xcode.app Then verify:

xcodebuild -version Expected output:

Xcode 16.2
Build version 16Cxxx

Confirming this works

However, before attempting to build your mobile app, make sure you delete your DerivedData folder from /Library/Developer/Xcode/DerivedData after reinstalling. It also doesn’t hurt to restart your system too.

Doing both made sure the 16.2 reinstallation worked for me the first attempt. Good luck!

Guys, everyone has already understood perfectly well that it is possible to roll back to Xcode 16.2. There is no need for everyone to write about it.

But the question is still when to expect a fix from the React Native side?

By the way, the reason of issue is indicated in the Xcode release note:

The base template for std::char_traits has been removed. If you are using std::char_traits with types other than char, wchar_t, char8_t, char16_t, char32_t or a custom character type for which you specialized std::char_traits, your code will stop working. The Standard does not mandate that a base template is provided, and such a base template is bound to be incorrect for some types, which could previously cause unexpected behavior while going undetected.

So in any case, you’ll have to wait for the fix by React Native community.

I also note that the new version of Xcode is undergoing beta testing. It’s very upsetting that no one from React Native community has mentioned this issue before. Or is no one using Xcode beta? )

Apparantly the new upgrade xcode 16.3 is causing this issue. Downgrade to Xcode 16.2 and it works fine it seems.

same issue on react native 0.72.17 Implicit instantiation of undefined template 'std::char_traits<fmt::internal::char8_type>'

Only downgrading the Xcode version can help now. Don’t waste your time, do a downgrade.

downgrading to 16.2 works I love xcode so much

"react-native": "0.77.2" seems to be building fine. So issue is up to 0.76.8.

@lorenc-tomasz thanks for opening the issue. This is something we were not expecting, as it is not a best practice to remove a type without warning first. We will try to fix it ass soon as possible.

@xubmuajkub we will not fix 0.71, as it is out of the support window @VanDinh18 we will not fix 0.72 as it is out of the support window @wdcs-krunalsatapara we will not fix 0.74 as it is out of the support window

I strongly advise you all to upgrade to a version in the support window. The version in the support windows are now 0.76, 0.77 and 0.78.

[!WARNING] Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

Not the worst April Fools’ joke. Same issue on 0.75.4

Waiting for the next update in XCODE.

From our investigation, the only affected version is React Native 0.76. We identified the source of the problem being the Folly version used in 0.76 (which is folly 2024.1.1). All the other versions of React Native use folly 2024.11.18

We will fix 0.76 in the next release.

We will not release versions of React Native < 0.76. As mentioned above, you can downgrade Xcode if you can’t upgrade to a supported version. Another way to downgrade is to install the Xcodes.app (highly recommended!) to have multiple versions of Xcode installed on your system.

same issue on react native 0.74.1 Implicit instantiation of undefined template ‘std::char_traits<unsigned char>’

For those working with Expo, there was a patch topic at https://expo.dev/changelog/xcode-16-3-patches I followed and it works !

Upgrading react-native to 0.77.2 instead of downgrading XCode as @lorenc-tomasz suggested seems to fix the build issue. At runtime, I now get this error at runtime but it’s not clear if it’s caused by using a different version of react-native than rest of the dependencies.

Warning: TypeError: findHostInstance_DEPRECATED is not a function (it is undefined)

Then you need to upgrade Reanimated, then react-native-screens, then react-native-svg etc. 🙈

I’m using an Expo project set up with 0.76.7. It worked for me on latest XCode after I ran the following:

npm i -s react-native@0.77.2

and

npx expo install expo-dev-client

The first command not only updates react-native core but also any other react-native packages that need to be upgraded. The second one was a fancy way of updating expo-dev-client in my packages to the latest. This runs for me on XCode 16.3

@cipolleschi Thanks. I guess no one could expect that they remove type. On the other hand it’s Apple and they did similar things in the past.

Workarounds:

  1. User Xcode 16.2 to the build app.
  2. If you want to use new Xcode 16.3. Migrate to RN 077.x+. Migration from 0.76.x is easy (you don’t need to migrate to AppDelegate.swift, just remember about: https://reactnative.dev/blog/2025/01/21/version-0.77#rctappdependencyprovider).
  3. When you are on older and unsupported versions - it’s time to migrate 😦 I know the pain.

Same issue on "react-native": "0.71.7"

Same issue

React Native: 0.71.18

Same issue using react-native 0.74.3, downgrading to XCode 16.2 fix it.

By the way, I just discover this tool to manage multiple XCode version, it’s really awesome: https://www.xcodes.app/

Downgrading Xcode 16.2 works for me.

In case someone needs to downgrade Xcode (manually), here’s how to:

📦 How to Downgrade Xcode from 16.3 to 16.2

If you need to downgrade Xcode for compatibility or stability reasons, here’s a step-by-step guide to go from Xcode 16.3 to 16.2.

🧹 1. Remove or Rename Xcode 16.3

You can’t have two versions of Xcode named Xcode.app in /Applications, so either delete or rename the current version.

🔥 Delete Xcode 16.3

sudo rm -rf /Applications/Xcode.app

💾 OR Rename It (if you want to keep it)

sudo mv /Applications/Xcode.app /Applications/Xcode-16.3.app

📥 2. Download Xcode 16.2

Go to the official Apple Developer Downloads page: 🔗 https://developer.apple.com/download/all/

  • Sign in with your Apple ID.
  • Search for “Xcode 16.2”.
  • Download the .xip archive (approx. 12GB).

📦 3. Install Xcode 16.2

Once downloaded:

  1. Double-click the .xip to extract Xcode.app.
  2. Move the extracted app to your Applications folder:

sudo mv ~/Downloads/Xcode.app /Applications/

✅ 4. Set Xcode 16.2 as the Active Version

Use xcode-select to make sure your system points to the correct Xcode version: sudo xcode-select -s /Applications/Xcode.app Then verify: xcodebuild -version Expected output:

Xcode 16.2
Build version 16Cxxx

Confirming this works

However, before attempting to build your mobile app, make sure you delete your DerivedData folder from /Library/Developer/Xcode/DerivedData after reinstalling. It also doesn’t hurt to restart your system too.

Doing both made sure the 16.2 reinstallation worked for me the first attempt. Good luck!

Downgrading Xcode to 16.2 works for me.

Thanks!

In case someone needs to downgrade Xcode (manually), here’s how to:

📦 How to Downgrade Xcode from 16.3 to 16.2

If you need to downgrade Xcode for compatibility or stability reasons, here’s a step-by-step guide to go from Xcode 16.3 to 16.2.

🧹 1. Remove or Rename Xcode 16.3

You can’t have two versions of Xcode named Xcode.app in /Applications, so either delete or rename the current version.

🔥 Delete Xcode 16.3

sudo rm -rf /Applications/Xcode.app

💾 OR Rename It (if you want to keep it)

sudo mv /Applications/Xcode.app /Applications/Xcode-16.3.app

📥 2. Download Xcode 16.2

Go to the official Apple Developer Downloads page:

🔗 https://developer.apple.com/download/all/

  • Sign in with your Apple ID.
  • Search for “Xcode 16.2”.
  • Download the .xip archive (approx. 12GB).

📦 3. Install Xcode 16.2

Once downloaded:

  1. Double-click the .xip to extract Xcode.app.
  2. Move the extracted app to your Applications folder:

sudo mv ~/Downloads/Xcode.app /Applications/

✅ 4. Set Xcode 16.2 as the Active Version

Use xcode-select to make sure your system points to the correct Xcode version:

sudo xcode-select -s /Applications/Xcode.app Then verify:

xcodebuild -version Expected output:

Xcode 16.2
Build version 16Cxxx

I followed this but still its not working,

I got and error after:

Image

Not sure if it’s related or same issue on v0.78, Xcode 16.3 and iOS 18.4. It seems like it may be an issue with Sentry but occurred after upgrading Xcode. Logs from Xcode:

Command SwiftEmitModule failed with a nonzero exit code

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/allocator_traits.h:378:17 Static assertion failed due to requirement 'is_same<std::allocator<const sentry::profiling::ThreadMetadataCache::ThreadHandleMetadataPair>, std::allocator<int>>::value': [allocator.requirements] states that rebinding an allocator to the same type should result in the original allocator

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/allocator.h:95:17 Static assertion failed due to requirement '!is_const<const sentry::profiling::ThreadMetadataCache::ThreadHandleMetadataPair>::value': std::allocator does not support const types

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__type_traits/enable_if.h:28:58 No type named 'type' in 'std::enable_if<false, int>'; 'enable_if' cannot be used to disable this declaration


/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/vector:427:50 No type named 'value_type' in 'std::allocator<const sentry::profiling::ThreadMetadataCache::ThreadHandleMetadataPair>'

https://github.com/getsentry/sentry-react-native/issues/4715

Waiting for the next update in XCODE.

This is nothing new unfortunately, though this is the first time I’ve had to downgrade (usually I’ve been able to solve similar issues with some configuration changes).

Thanks for the instructions though, @brandtnewlabs

It’s not a solutions. Please suggest a solution if we can can work on the same react native version.

I faced the same issue, but downgrading Xcode to 16.2 works for me. Thanks.

Same issue with: react-native 0.76.6, Expo 52.0.27 and Xcode 16.3.

✅ Downgrading worked.

(I love how this type of stuff is happening each year)

React Native Version is 0.72.4 XCode version is 16.3 (16E140)

when i make build in Xcode i m getting error –

Implicit instantiation of undefined template ‘std::char_traitsfmt::internal::char8_type’

not getting how to resolve ?

Just look at the thread… 🤦‍♂ downgrade to Xcode version 16.2

It will hamper a lot.

I was able to reproduce the issue with RN 0.76.8 and Xcode 16.3 on a new project (npx @react-native-community/cli@latest init --version 0.76.8).

Pasting the full log for reference

CompileC /Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/TurboCxxModule.o /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
    cd /Users/antonis/Downloads/test768/ios/Pods
    
    Using response file: /Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/82b82416624d2658e5098eb0a28c15c5-common-args.resp
    
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /Users/antonis/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.4-22E235-71825a6d136aa4733edcbe86ece5525b.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/antonis/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Index.noindex/DataStore @/Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -DFOLLY_CFG_NO_COROUTINES\=1 -DFOLLY_HAVE_CLOCK_GETTIME\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -include /Users/antonis/Downloads/test768/ios/Pods/Target\ Support\ Files/ReactCommon/ReactCommon-prefix.pch -MMD -MT dependencies -MF /Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/TurboCxxModule.d --serialize-diagnostics /Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/TurboCxxModule.dia -c /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp -o /Users/antonis/Library/Developer/Xcode/DerivedData/test768-bugcncednzgcheecigxpsmpmipbz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/TurboCxxModule.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/arm64/TurboCxxModule.o

In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp:8:
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/vector:325:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__format/formatter_bool.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__format/concepts.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__format/format_parse_context.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/string_view:300:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
  300 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
      |                                          ^
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp:8:
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/memory:940:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/allocator.h:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/allocate_at_least.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/allocator_traits.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/construct_at.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__utility/move.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__type_traits/is_constructible.h:24:79: note: in instantiation of template class 'std::basic_string_view<unsigned char>' requested here
   24 | struct _LIBCPP_TEMPLATE_VIS is_constructible : public integral_constant<bool, __is_constructible(_Tp, _Args...)> {};
      |                                                                               ^
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp:8:
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h:13:
In file included from /Users/antonis/Downloads/test768/ios/Pods/Headers/Public/React-cxxreact/cxxreact/CxxModule.h:15:
In file included from /Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/dynamic.h:71:
In file included from /Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Expected.h:36:
In file included from /Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Optional.h:74:
/Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Traits.h:665:24: note: in instantiation of template class 'std::is_constructible<std::basic_string_view<unsigned char>, const unsigned char *const &, unsigned long>' requested here
  665 |     : std::conditional<T::value, Conjunction<TList...>, T>::type {};
      |                        ^
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp:8:
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h:13:
In file included from /Users/antonis/Downloads/test768/ios/Pods/Headers/Public/React-cxxreact/cxxreact/CxxModule.h:15:
In file included from /Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/dynamic.h:72:
/Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Range.h:649:9: note: in instantiation of template class 'folly::Conjunction<std::is_constructible<std::basic_string_view<unsigned char>, const unsigned char *const &, unsigned long>, std::is_constructible<folly::Range<const char *>, std::basic_string_view<unsigned char>>>' requested here
  649 |       : Conjunction<
      |         ^
/Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Range.h:672:16: note: in instantiation of template class 'folly::Range<const unsigned char *>::IsConstructibleViaStringView<folly::Range<const char *>>' requested here
  672 |               !IsConstructibleViaStringView<Tgt>::value,
      |                ^
/Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Range.h:674:22: note: while substituting prior template arguments into non-type template parameter [with Tgt = folly::Range<const char *>]
  674 |   constexpr explicit operator Tgt() const noexcept(
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  675 |       std::is_nothrow_constructible<Tgt, Iter const&, size_type>::value) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  676 |     return Tgt(b_, walk_size());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  677 |   }
      |   ~
/Users/antonis/Downloads/test768/ios/Pods/Headers/Public/RCT-Folly/folly/Range.h:1623:19: note: while substituting deduced template arguments into function template 'operator type-parameter-0-0' [with Tgt = folly::Range<const char *>, $1 = (no value)]
 1623 |       StringPiece(haystack), StringPiece(needles));
      |                   ^
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp:8:
In file included from /Users/antonis/Downloads/test768/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/memory:944:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/inout_ptr.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__fwd/ostream.h:13:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
   23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
      |                             ^
1 error generated.

RN 0.78.0 works for me without any issues.

"react-native": "0.77.2" seems to be building fine. So issue is up to 0.76.8.

Are u sure it fine with 77.2?

same issue on react native 0.71.7 (Native CLI version) Implicit instantiation of undefined template ‘std::char_traitsfmt::internal::char8_type’

even tried upgrading to 0.77.2, it gave different issue i.e @react-native-community/cli needs to added as dev dependencies.

could someone help me out?

https://xcodereleases.com/ 16.2 helped me

I’ve updated to React Native version 0.77.2 and now it works.

For those working with Expo, there was a patch topic at https://expo.dev/changelog/xcode-16-3-patches I followed and it works !

Worked great for me to get dev builds working on iOS simulator again (and updated to 0.77.2). Thank you.

Same here

react-native: 0.76.7 Xcode 16.3

Same issue.

I have to downgrade to Xcode v16.2

Same issue for me, using react-native: 0.75.5. Downgrade to 16.2 helped.

Seeing the same issue in versions 72->73

Thanks for opening this issue! I started thinking who is going to prepare a reproducible repo now 😕 Btw, downgrading xcode works. Waiting for the RN fix…

If anyone is downgrading don’t forget to remove DerivedData from /Library/Developer/Xcode/DerivedData. You might get some build error while running in simulator.

I saw the issue in react native 0.77.1 (via Expo) as well.

Same issue on "react-native": "0.75.4", I’m upgrading the react-native version to 0.76.7