1

I am developing a mobile app using Expo (bare workflow) and React Native on an M1 MacBook. After reinstalling macOS and restoring my project backup, the iOS build fails, while Android builds and runs fine.

Environment changes after macOS reinstall:

  • macOS: Sequoia → Tahoe
  • Node.js: 18.x.x → 22.20.0
  • Xcode: upgraded to 26.0.1
  • CocoaPods: latest version
  • npm: ?? → 10.9.3

Relevant package versions in package.json:

"expo": "^53.0.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.5",
"react-native-screens": "~4.11.1"

Steps performed:

  1. Deleted:
node_modules
package-lock.json
ios/Pods
ios/Podfile.lock
ios/build
  1. Reinstalled:
npm install
cd ios && pod install --repo-update
  1. Built:
npx expo run:android   # Works fine
npx expo run:ios       # Fails

Error message:

...
...
❌  (node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.mm:40:49)
  38 | #endif // RCT_NEW_ARCH_ENABLED
  39 | 
> 40 | static constexpr auto DEFAULT_TITLE_FONT_SIZE = @17;
     |                                                 ^ constexpr variable 'DEFAULT_TITLE_FONT_SIZE' must be initialized by a constant expression
  41 | static constexpr auto DEFAULT_TITLE_LARGE_FONT_SIZE = @34;
  42 | 
  43 | #if !defined(RCT_NEW_ARCH_ENABLED)

❌  (node_modules/react-native-screens/ios/RNSScreenStackHeaderConfig.mm:41:55)
  39 | 
  40 | static constexpr auto DEFAULT_TITLE_FONT_SIZE = @17;
> 41 | static constexpr auto DEFAULT_TITLE_LARGE_FONT_SIZE = @34;
     |                                                       ^ constexpr variable 'DEFAULT_TITLE_LARGE_FONT_SIZE' must be initialized by a constant expression
...
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

I have already upgraded react-native-screens from version 4.11.1 to 4.16.x, but the error still persists. I also deleted node_modules, Pods, and Podfile.lock, then reinstalled everything, followed by running pod install --repo-update. In addition, I performed a clean build in Xcode and checked the Fabric settings by setting use_react_native!(fabric_enabled: false), but none of these steps resolved the issue.

Has anyone experienced this issue with react-native-screens on React Native 0.79.x? Is there a known fix or a compatible version of react-native-screens for this setup?

Thank you for your help!

1
  • Hey, I am experiencing this did you find any solution for this ? Commented Nov 12 at 14:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.