Skip to content

Commit e49b13a

Browse files
committed
fix(ios): resolve Xcode 26 build failures with fmt consteval and icon sizing
Xcode 26's stricter Clang rejects consteval usage in the fmt library bundled with hermes-engine, and enforces exact imagestack layer sizing for tvOS app icons.
1 parent f4ed4f6 commit e49b13a

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

apps/expo-multi-tv/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"./plugins/withKotlinJvmTarget",
55
"./plugins/withKeyEvent",
66
"./plugins/withTvosDeploymentTarget",
7+
"./plugins/withFmtXcode26Fix",
78
[
89
"@react-native-tvos/config-tv",
910
{
1.39 KB
Loading
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const { withDangerousMod } = require("expo/config-plugins");
2+
const fs = require("fs");
3+
const path = require("path");
4+
5+
function withFmtXcode26Fix(config) {
6+
return withDangerousMod(config, [
7+
"ios",
8+
(config) => {
9+
const podfilePath = path.join(
10+
config.modRequest.platformProjectRoot,
11+
"Podfile"
12+
);
13+
let podfile = fs.readFileSync(podfilePath, "utf8");
14+
15+
const fmtFix = `
16+
# Fix fmt consteval errors on Xcode 26+
17+
installer.pods_project.targets.each do |target|
18+
if target.name == 'fmt'
19+
target.build_configurations.each do |config|
20+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
21+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'FMT_CONSTEVAL=constexpr'
22+
end
23+
end
24+
end`;
25+
26+
podfile = podfile.replace(
27+
/post_install do \|installer\|/,
28+
`post_install do |installer|${fmtFix}`
29+
);
30+
31+
fs.writeFileSync(podfilePath, podfile, "utf8");
32+
return config;
33+
},
34+
]);
35+
}
36+
37+
module.exports = withFmtXcode26Fix;

0 commit comments

Comments
 (0)