File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 "useExoplayerDash" : false
4848 }
4949 }
50- ]
50+ ],
51+ " ./plugins/withFmtXcode26Fix"
5152 ],
5253 "name" : " MultiTVSample" ,
5354 "slug" : " MultiTVSample" ,
Original file line number Diff line number Diff line change 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+ if ( podfile . includes ( "CLANG_CXX_LANGUAGE_STANDARD" ) && podfile . includes ( "fmt" ) ) {
16+ return config ;
17+ }
18+
19+ const fmtFix = `
20+ # Fix fmt consteval errors on Xcode 26+ by compiling fmt with C++17
21+ installer.pods_project.targets.each do |target|
22+ if target.name == 'fmt'
23+ target.build_configurations.each do |bc|
24+ bc.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
25+ end
26+ end
27+ end` ;
28+
29+ podfile = podfile . replace (
30+ / p o s t _ i n s t a l l d o \| i n s t a l l e r \| / ,
31+ `post_install do |installer|${ fmtFix } `
32+ ) ;
33+
34+ fs . writeFileSync ( podfilePath , podfile , "utf8" ) ;
35+ return config ;
36+ } ,
37+ ] ) ;
38+ }
39+
40+ module . exports = withFmtXcode26Fix ;
You can’t perform that action at this time.
0 commit comments