Issue with react-native-vision-camera on iOS build - Compatibility and C++ Version Problem

Hi everyone,

I'm encountering a persistent issue when trying to build my React Native project for iOS. I'm using the react-native-vision-camera library (version 4.6.4) and I've set my iOS deployment target to 16.0 in the app.json file. Despite this, the build process fails with an error related to the react-native-vision-camera pod, which seems to be stuck on an older version (2.15.4) that requires a different C++ version and a lower deployment target.

Here's what I've tried so far:

Ensured that the C++ version is set to 17 as required.

Cleared and reinstalled all pods (rm -rf ios/Pods ios/Podfile.lock followed by pod install).

Confirmed that the deploymentTarget in the app.json is set correctly to 16.0.

However, the error persists and the build continues to fail, pointing to a compatibility issue with the react-native-vision-camera pod. I'm not sure if there's a cache issue or a configuration step I'm missing.

Environment:

React Native version: 0.76.7

react-native-vision-camera version: 4.6.4

iOS deployment target: 16.0

Expo SDK version: 52.0.40

Attached: app.json, eas.json, package.json, and the error log screenshot.

Error log screnshot:

Files:

Any insights or suggestions from the community or Apple engineers would be greatly appreciated. Thank you!

which seems to be stuck on an older version (2.15.4) that requires a different C++ version and a lower deployment target.

Nothing in your attachments gives me more info on the error around this. Xcode 16.4 beta resolves an issue with C++ that might be related, but I can't be sure without the info from your logs. Here's what the release note says so you can determine if this is your C++ issue or not:

Fixed: The base template for std::char_traits is restored after being removed in Xcode 16.3; it is still deprecated and is going to be removed in a future release. Restoring the base template allows code that attempts to instantiate char_traits with types that are not provided by the Standard (for example, std::basic_string<long long> and similar) to still compile, giving it more time to transition.
 (149025504)

— Ed Ford,  DTS Engineer

Issue with react-native-vision-camera on iOS build - Compatibility and C&#43;&#43; Version Problem
 
 
Q