Skip to content

fix(ios): force fmt to c++17 for Xcode 26#5997

Open
samholmes wants to merge 1 commit intodevelopfrom
sam/ios-26-sdk
Open

fix(ios): force fmt to c++17 for Xcode 26#5997
samholmes wants to merge 1 commit intodevelopfrom
sam/ios-26-sdk

Conversation

@samholmes
Copy link
Copy Markdown
Contributor

@samholmes samholmes commented Apr 18, 2026

Newer Apple Clang toolchains fail to compile fmt 11.0.2 under C++20 with consteval-related errors, blocking simulator builds on Xcode 26.

Keep the workaround in Podfile post_install so pod regeneration consistently reapplies FMT_USE_CONSTEVAL=0 and fmt-specific C++17 settings instead of requiring manual edits in Pods/.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Medium Risk
Moderate risk because it changes global pod build settings and post-install behavior, which can affect compilation flags across dependencies and may introduce subtle build issues on other Xcode/CI configurations.

Overview
Fixes Xcode/Apple Clang build failures by adding Podfile post_install workarounds for the fmt pod: globally defines FMT_USE_CONSTEVAL=0 and forces fmt to compile as C++17.

Because react_native_post_install can override podspec C++ settings, the PR also re-applies the fmt C++17 settings after that step (including updating generated .xcconfig files) so the workaround persists across pod install regenerations.

Reviewed by Cursor Bugbot for commit f4e8c87. Bugbot is set up for automated code reviews on this repo. Configure here.


Newer Apple Clang toolchains fail to compile fmt 11.0.2 under
C++20 with consteval-related errors, blocking simulator builds on
Xcode 26.

Keep the workaround in Podfile post_install so pod regeneration
consistently reapplies FMT_USE_CONSTEVAL=0 and fmt-specific C++17
settings instead of requiring manual edits in Pods/.
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f4e8c87. Configure here.

Comment thread ios/Podfile
# May not be needed when upgrading to newer versions of React Native.
if target.name == 'fmt'
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First C++17 setting for fmt is dead code

Low Severity

The CLANG_CXX_LANGUAGE_STANDARD = 'c++17' setting for fmt at lines 82–84 is overwritten by react_native_post_install (line 109), which the comment at line 116 explicitly acknowledges resets C++ standards. Only the second block (lines 119–139) has a lasting effect, making the first setting dead code that could mislead future maintainers into thinking it's effective.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f4e8c87. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant