Repository navigation
Conversation
|
@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D124979668. |
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 13, 2026
Summary: Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RCT_STRICT_CXX_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. The flag is off by default: libraries that still include React Native's internal headers would stop compiling. Turning it back off removes the define on the next `pod install`. This mirrors the existing `RCT_REMOVE_LEGACY_*` opt-ins and matches the scope of the Android opt-in. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
from
October 13, 2026 14:37
e61a4cf to
ba43662
Compare
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 13, 2026
Summary: Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
from
October 13, 2026 15:11
ba43662 to
685f223
Compare
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 13, 2026
Summary: Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
from
October 13, 2026 15:13
685f223 to
c191dde
Compare
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 13, 2026
Summary: Pull Request resolved: react#59037 Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
2 times, most recently
from
October 14, 2026 08:11
8202e06 to
fe0e701
Compare
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 14, 2026
Summary: Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 14, 2026
Summary: Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
2 times, most recently
from
October 14, 2026 08:14
74cbb50 to
e096ea5
Compare
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 14, 2026
Summary: Pull Request resolved: react#59037 Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 14, 2026
Summary: Pull Request resolved: react#59037 Let iOS apps that use CocoaPods enforce React Native's C++ stable API. Setting `RN_STRICT_API=1` before `pod install` defines `RN_STRICT_API` in the app project and the Pods project, so the `react/cxxstableapi` guards apply to the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Under the flag, a direct include of a public module header is an error that points to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning that `RN_ALLOW_FRAMEWORKS` silences. Changelog: [iOS][Added] - Add `RCT_STRICT_CXX_API` CocoaPods opt-in to enforce React Native's C++ stable API in app and library native code Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
from
October 14, 2026 08:19
e096ea5 to
18b3865
Compare
coado
force-pushed
the
export-D124979668
branch
from
October 16, 2026 11:55
18b3865 to
29cf648
Compare
coado
added a commit
to coado/react-native
that referenced
this pull request
Oct 16, 2026
…t#59037) Summary: Let iOS apps that use CocoaPods enforce React Native's C++ stable API, and control its "for frameworks" warning, with two env vars read at `pod install`: - `RN_STRICT_API=1` defines the `RN_STRICT_API` macro, which arms the `react/cxxstableapi` guards. A direct include of a public module header is an error pointing to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning. - `RN_ALLOW_FRAMEWORKS=1` defines the `RN_ALLOW_FRAMEWORKS` macro, which silences that warning. Each variable is named after the macro it defines, matching the Android opt-in, which passes `RN_STRICT_API` to CMake. Both macros are added to the app project and the Pods project, so they reach the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Both are off by default; running `pod install` without a variable removes its define again. This mirrors the existing `RCT_REMOVE_LEGACY_*` opt-ins and the Android opt-in. Who silences the "for frameworks" warning for which code: - A library that uses for-frameworks headers declares `RN_ALLOW_FRAMEWORKS` for its own pod (`pod_target_xcconfig`). That covers its own build only and never reaches the app or other pods. - The app author sets `RN_ALLOW_FRAMEWORKS=1` before `pod install` for the app's own code. It also silences libraries that use those headers without declaring it, which is on the library. - The generated `ReactCodegen` and `ReactAppDependencyProvider` pods always define `RN_ALLOW_FRAMEWORKS`: nobody can act on a warning in generated code, and libraries are already held to the API in their own pods. Changelog: [iOS][Added] - Add `RN_STRICT_API` and `RN_ALLOW_FRAMEWORKS` CocoaPods opt-ins to enforce React Native's C++ stable API in app and library native code Reviewed By: cipolleschi Differential Revision: D124979668
…t#59037) Summary: Pull Request resolved: react#59037 Let iOS apps that use CocoaPods enforce React Native's C++ stable API, and control its "for frameworks" warning, with two env vars read at `pod install`: - `RN_STRICT_API=1` defines the `RN_STRICT_API` macro, which arms the `react/cxxstableapi` guards. A direct include of a public module header is an error pointing to the module's umbrella (`<React/<Module>.h>`), a private header is an error, and a "for frameworks" header is a warning. - `RN_ALLOW_FRAMEWORKS=1` defines the `RN_ALLOW_FRAMEWORKS` macro, which silences that warning. Each variable is named after the macro it defines, matching the Android opt-in, which passes `RN_STRICT_API` to CMake. Both macros are added to the app project and the Pods project, so they reach the app, third-party pods and app codegen. React Native's own pods are unaffected because they define `RN_BUILDING`. Both are off by default; running `pod install` without a variable removes its define again. This mirrors the existing `RCT_REMOVE_LEGACY_*` opt-ins and the Android opt-in. Who silences the "for frameworks" warning for which code: - A library that uses for-frameworks headers declares `RN_ALLOW_FRAMEWORKS` for its own pod (`pod_target_xcconfig`). That covers its own build only and never reaches the app or other pods. - The app author sets `RN_ALLOW_FRAMEWORKS=1` before `pod install` for the app's own code. It also silences libraries that use those headers without declaring it, which is on the library. - The generated `ReactCodegen` and `ReactAppDependencyProvider` pods always define `RN_ALLOW_FRAMEWORKS`: nobody can act on a warning in generated code, and libraries are already held to the API in their own pods. Changelog: [iOS][Added] - Add `RN_STRICT_API` and `RN_ALLOW_FRAMEWORKS` CocoaPods opt-ins to enforce React Native's C++ stable API in app and library native code Reviewed By: cipolleschi Differential Revision: D124979668
coado
force-pushed
the
export-D124979668
branch
from
October 16, 2026 11:58
29cf648 to
94637b6
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Let iOS apps that use CocoaPods enforce React Native's C++ stable API, and control its "for frameworks" warning, with two env vars read at
pod install:RN_STRICT_API=1defines theRN_STRICT_APImacro, which arms thereact/cxxstableapiguards. A direct include of a public module header is an error pointing to the module's umbrella (<React/<Module>.h>), a private header is an error, and a "for frameworks" header is a warning.RN_ALLOW_FRAMEWORKS=1defines theRN_ALLOW_FRAMEWORKSmacro, which silences that warning.Each variable is named after the macro it defines, matching the Android opt-in, which passes
RN_STRICT_APIto CMake.Both macros are added to the app project and the Pods project, so they reach the app, third-party pods and app codegen. React Native's own pods are unaffected because they define
RN_BUILDING. Both are off by default; runningpod installwithout a variable removes its define again. This mirrors the existingRCT_REMOVE_LEGACY_*opt-ins and the Android opt-in.Who silences the "for frameworks" warning for which code:
RN_ALLOW_FRAMEWORKSfor its own pod (pod_target_xcconfig). That covers its own build only and never reaches the app or other pods.RN_ALLOW_FRAMEWORKS=1beforepod installfor the app's own code. It also silences libraries that use those headers without declaring it, which is on the library.ReactCodegenandReactAppDependencyProviderpods always defineRN_ALLOW_FRAMEWORKS: nobody can act on a warning in generated code, and libraries are already held to the API in their own pods.Changelog:
[iOS][Added] - Add
RN_STRICT_APIandRN_ALLOW_FRAMEWORKSCocoaPods opt-ins to enforce React Native's C++ stable API in app and library native codeReviewed By: cipolleschi
Differential Revision: D124979668