Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/expo-multi-tv/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"useExoplayerDash": false
}
}
]
],
"./plugins/withFmtXcode26Fix"
],
"name": "MultiTVSample",
"slug": "MultiTVSample",
Expand Down
Binary file modified apps/expo-multi-tv/assets/tv_icons/icon-400x240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions apps/expo-multi-tv/plugins/withFmtXcode26Fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const { withDangerousMod } = require("expo/config-plugins");
const fs = require("fs");
const path = require("path");

function withFmtXcode26Fix(config) {
return withDangerousMod(config, [
"ios",
(config) => {
const podfilePath = path.join(
config.modRequest.platformProjectRoot,
"Podfile"
);
let podfile = fs.readFileSync(podfilePath, "utf8");

if (podfile.includes("CLANG_CXX_LANGUAGE_STANDARD") && podfile.includes("fmt")) {
return config;
}

const fmtFix = `
# Fix fmt consteval errors on Xcode 26+ by compiling fmt with C++17
installer.pods_project.targets.each do |target|
if target.name == 'fmt'
target.build_configurations.each do |bc|
bc.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end
end
end`;

podfile = podfile.replace(
/post_install do \|installer\|/,
`post_install do |installer|${fmtFix}`
);

fs.writeFileSync(podfilePath, podfile, "utf8");
return config;
},
]);
}

module.exports = withFmtXcode26Fix;