Skip to content

Build the template app with RN_STRICT_API - #59224

Closed
coado wants to merge 3 commits into
react:mainfrom
coado:export-D126330998
Closed

coado wants to merge 3 commits into
react:mainfrom
coado:export-D126330998

Conversation

@coado

@coado coado commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary:
Turn on the C++ stable API checks (RN_STRICT_API) in the template apps CI builds, so the opt-ins, React Native's app-facing headers and the generated codegen and autolinking code are compiled in strict mode the way a new app would build them:

  • private/helloworld: strictCxxApiEnabled=true in android/gradle.properties, and the Podfile sets RN_STRICT_API=1 unless the environment already sets it (RN_STRICT_API=0 pod install opts out).
  • Community template CI (cloned at build time): build-android-templateapp.yml appends strictCxxApiEnabled=true to the generated app's gradle.properties, and e2e-ios-templateapp.yml runs its pod install with RN_STRICT_API=1.

Changelog: [Internal]

Differential Revision: D126330998

coado added 3 commits October 20, 2026 04:38
…droid C++ (react#59222)

Summary:

Two C++ files built into RN-Tester include public React Native headers directly instead of through their module umbrella, which is an `#error` under `RN_STRICT_API`:

- `rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.cpp`,
- `react/debug/react_native_assert.h`,
- The checked-in codegen output of `react-native/popup-menu-android` (`Props.cpp`) included `react/renderer/core/PropsParserContext.h` and `propsConversions.h`.

No behavior change; this prepares RN-Tester to build with `RN_STRICT_API` by default.

Changelog: [Internal]

Differential Revision: D126328619
Summary:

Turn on the C++ stable API checks (`RN_STRICT_API`) in RN-Tester by default, so the opt-ins and React Native's app-facing headers are exercised in strict mode on every build:

- Android: `strictCxxApiEnabled=true` in `android/app/gradle.properties`. 
- iOS (CocoaPods): the Podfile sets `RN_STRICT_API=1` unless the environment already sets it, so `pod install` applies it the same way an app would. 


Changelog: [Internal]

Differential Revision: D126330702
Summary:
Turn on the C++ stable API checks (`RN_STRICT_API`) in the template apps CI builds, so the opt-ins, React Native's app-facing headers and the generated codegen and autolinking code are compiled in strict mode the way a new app would build them:

- `private/helloworld`: `strictCxxApiEnabled=true` in `android/gradle.properties`, and the Podfile sets `RN_STRICT_API=1` unless the environment already sets it (`RN_STRICT_API=0 pod install` opts out). 
- Community template CI (cloned at build time): `build-android-templateapp.yml` appends `strictCxxApiEnabled=true` to the generated app's `gradle.properties`, and `e2e-ios-templateapp.yml` runs its `pod install` with `RN_STRICT_API=1`.


Changelog: [Internal]

Differential Revision: D126330998
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 20, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner labels Oct 20, 2026
@meta-codesync

meta-codesync Bot commented Oct 20, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126330998.

@facebook-github-tools facebook-github-tools Bot added the p: Facebook Partner: Facebook label Oct 20, 2026
@meta-codesync meta-codesync Bot closed this in 5b6f18b Oct 22, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 22, 2026
@meta-codesync

meta-codesync Bot commented Oct 22, 2026

Copy link
Copy Markdown

This pull request has been merged in 5b6f18b.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant