Summary
iOS build fails when using Expo SDK 55 (React Native 0.83.2) with Xcode 26.4 and buildReactNativeFromSource: true. The bundled fmt 11.0.2 library produces 5 compilation errors related to consteval.
This only affects projects that build React Native from source. Prebuilt binaries are not affected.
Environment
- Expo SDK: 55
- React Native: 0.83.2
- fmt: 11.0.2 (bundled via
react-native/third-party-podspecs/fmt.podspec)
- Xcode: 26.4 (Build version 17E192)
- macOS: Darwin 25.3.0
Error Output
❌ (ios/Pods/fmt/include/fmt/format-inl.h:59:24)
57 | auto it = appender(out);
58 | if (message.size() <= inline_buffer_size - error_code_size)
> 59 | fmt::format_to(it, FMT_STRING("{}{}"), message, SEP);
| ^ call to consteval function 'fmt::basic_format_string<char,
fmt::basic_string_view<char> &, const char [3]>::basic_format_string<FMT_COMPILE_STRING, 0>'
is not a constant expression
5 similar errors all in format-inl.h, all caused by FMT_STRING macro using consteval.
Root Cause
fmt 11.0.2 defines FMT_USE_CONSTEVAL=1 when it detects Clang ≥ 11.01 (see fmt/base.h line 128). However, Apple Clang shipped with Xcode 26.4 enforces stricter consteval rules than previous versions, causing FMT_STRING macro expansions to fail.
Related upstream issues:
Reproduction
npx create-expo-app@latest fmt-test --template blank-typescript
cd fmt-test
npx expo install expo-build-properties
Then update app.json to enable building React Native from source:
{
"expo": {
"plugins": [
["expo-build-properties", {
"ios": {
"buildReactNativeFromSource": true
}
}]
]
}
}
Then build:
npx expo run:ios # on Xcode 26.4 — fails with 5 fmt consteval errors
Note: Without buildReactNativeFromSource: true, the build succeeds because prebuilt binaries are used and fmt is not compiled from source.
Workaround
Create an Expo Config Plugin that patches the Podfile to disable consteval in fmt:
// plugins/ios/withFmtFix.js
const { withDangerousMod } = require("@expo/config-plugins");
const fs = require("node:fs");
const path = require("node:path");
const withFmtFix = (config) => {
return withDangerousMod(config, [
"ios",
async (config) => {
const podfilePath = path.join(
config.modRequest.platformProjectRoot,
"Podfile"
);
if (!fs.existsSync(podfilePath)) return config;
let content = fs.readFileSync(podfilePath, "utf-8");
if (content.includes("FMT_USE_CONSTEVAL")) return config;
const patchCode = `
# Fix fmt 11.0.2 consteval compilation error with Xcode 26.4+
fmt_base = File.join(installer.sandbox.pod_dir('fmt'), 'include', 'fmt', 'base.h')
if File.exist?(fmt_base)
content = File.read(fmt_base)
patched = content.gsub(/^#\\s*define FMT_USE_CONSTEVAL 1$/, '# define FMT_USE_CONSTEVAL 0')
if patched != content
File.chmod(0644, fmt_base)
File.write(fmt_base, patched)
end
end`;
content = content.replace(
/(react_native_post_install\([^)]*\)[\s\S]*?\))([\s\n]*end[\s\n]*end)/,
`$1\n${patchCode}\n$2`
);
fs.writeFileSync(podfilePath, content);
return config;
},
]);
};
module.exports = withFmtFix;
Then add "./plugins/ios/withFmtFix" to the plugins array in app.config.ts.
Expected Behavior
npx expo run:ios should compile successfully on Xcode 26.4, even with buildReactNativeFromSource: true.
Suggested Fix
Either:
- Bump fmt to a version that handles newer Apple Clang correctly, or
- Add
FMT_USE_CONSTEVAL=0 to fmt's build settings in the generated Podfile template when building from source
Summary
iOS build fails when using Expo SDK 55 (React Native 0.83.2) with Xcode 26.4 and
buildReactNativeFromSource: true. The bundledfmt 11.0.2library produces 5 compilation errors related toconsteval.This only affects projects that build React Native from source. Prebuilt binaries are not affected.
Environment
react-native/third-party-podspecs/fmt.podspec)Error Output
5 similar errors all in
format-inl.h, all caused byFMT_STRINGmacro usingconsteval.Root Cause
fmt 11.0.2definesFMT_USE_CONSTEVAL=1when it detects Clang ≥ 11.01 (seefmt/base.hline 128). However, Apple Clang shipped with Xcode 26.4 enforces stricterconstevalrules than previous versions, causingFMT_STRINGmacro expansions to fail.Related upstream issues:
std::stringfail to compile withconstevalfmtlib/fmt#4046 (consteval compilation failure)Reproduction
npx create-expo-app@latest fmt-test --template blank-typescript cd fmt-test npx expo install expo-build-propertiesThen update
app.jsonto enable building React Native from source:{ "expo": { "plugins": [ ["expo-build-properties", { "ios": { "buildReactNativeFromSource": true } }] ] } }Then build:
npx expo run:ios # on Xcode 26.4 — fails with 5 fmt consteval errorsNote: Without
buildReactNativeFromSource: true, the build succeeds because prebuilt binaries are used andfmtis not compiled from source.Workaround
Create an Expo Config Plugin that patches the Podfile to disable
constevalin fmt:Then add
"./plugins/ios/withFmtFix"to the plugins array inapp.config.ts.Expected Behavior
npx expo run:iosshould compile successfully on Xcode 26.4, even withbuildReactNativeFromSource: true.Suggested Fix
Either:
FMT_USE_CONSTEVAL=0to fmt's build settings in the generated Podfile template when building from sourceHi, @zhenyu-hong - thanks a lot for the issue! This is an issue in React Native itself - which is already fixed - so we have requested it to be released in 0.83 with Expo as soon as possible.
We'll keep this one open and track the issue here until we get the release out.
If this is an issue for anyone else, @vj2303 has made a fix that can be used in Expo until React Native is updated.