feat(iOS): serve third-party deps from the prebuilt ReactNativeDependencies pod via dependency-only facades#57440
Open
chrfalch wants to merge 4 commits into
Open
Conversation
|
Caution Invalid Base Branch The base branch for this PR is |
… handling - rndependencies.rb: the previous "||= [] << path" only added the deps header search path when HEADER_SEARCH_PATHS was unset — with an existing value the path was silently dropped. Normalize string values and always append. Also point the search path at the pod-local flattened Headers/ (single header home) instead of the artifact root. - ReactNativeDependencies.podspec: prepare_command exited 0 when XCFRAMEWORK_PATH/HEADERS_PATH resolved empty, producing a silent no-link pod; fail closed with exit 1. - reactNativeDependencies.js: an artifact without a version marker logged "we are going to use it anyway" but then fell through to rmSync + re-download, destroying locally staged deps builds; honor the message and use it as-is. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…uilt-deps mode In prebuilt-deps mode the real source pods (RCT-Folly, glog, boost, DoubleConversion, fmt, fast_float, SocketRocket) are not declared in the Podfile, so a community podspec's hardcoded 's.dependency "RCT-Folly"' would resolve from the CocoaPods trunk and compile from source next to the prebuilt binary — the dual-copy bug class behind the 2026-07-03 SocketRocket regression. RNDepsFacades generates dependency-only local facade podspecs (build/rndeps-facades/<Name>/): no sources, no headers, a single dependency on ReactNativeDependencies. Versions and subspecs are derived from the real podspecs in third-party-podspecs/ (RCT-Folly keeps /Default + /Fabric with default_subspecs = ["Default"]; SocketRocket is synthesized from socket_rocket_config, fail-closed if absent). Declared as :path pods so Podfile-local resolution beats trunk and nothing is fetched. ReactNativeDependencies remains the single header authority. Docs: scripts/cocoapods/__docs__/prebuilt-deps.md describes the full prebuilt-deps header/facade contract and the mode-by-mode supplier table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ayout
- Embed an RN-authored, accurate-empty PrivacyInfo.xcprivacy for
SocketRocket in the deps prebuild (upstream ships no privacy manifest;
the deps artifact historically carried resource bundles only for
boost/folly/glog). SocketRocket uses no Required Reason APIs.
- Xcode 26's SwiftPM rejects a public-headers directory where the
umbrella header has sibling directories ("target 'SocketRocket' has
invalid header layout"): stage the flat public headers into include/
via prepareScript and point publicHeaderFiles there. Xcode 16 accepts
both layouts; the artifact's Headers/SocketRocket namespace is
unaffected.
- Rename the dependency 'socket-rocket' -> 'SocketRocket' so the bundle
and header-namespace naming line up
(ReactNativeDependencies_SocketRocket.bundle).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pure formatting — no content change. Fixes the format-check lint lane. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8158f41 to
562985d
Compare
069c350 to
017ca51
Compare
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
Step 1 of making the prebuilt
ReactNativeDependenciespod the single header authority for the third-party C/C++ deps (RCT-Folly, glog, boost, DoubleConversion, fmt, fast_float, SocketRocket) in prebuilt-deps mode.Today the deps binary replaces the source pods' code, but the pod still
s.dependency's the real source pods and borrows their headers via$(PODS_ROOT)/<pod>search paths. That split header authority is the dual-copy bug class behind the 2026-07-03 SocketRocket regression (duplicate @interfaceunderuse_frameworks!— SocketRocket's ObjC headers have no include guards).Three commits:
fix(cocoapods): harden prebuilt-deps header search paths and artifact handling —
rndependencies.rb's||= [] << pathonly added the deps header search path whenHEADER_SEARCH_PATHSwas unset (silently dropped otherwise); normalize and always append, and point at the pod-local flattenedHeaders/.ReactNativeDependencies.podspecprepare_commandnow fails closed (exit 1) instead of silently producing a no-link pod.reactNativeDependencies.jsno longer deletes + re-downloads a locally staged artifact that lacks a version marker.feat(cocoapods): dependency-only facades for third-party pods in prebuilt-deps mode — in prebuilt-deps mode the real source pods are not declared, so a community podspec's hardcoded
s.dependency "RCT-Folly"would resolve from trunk and compile from source next to the prebuilt binary.RNDepsFacadesgenerates dependency-only local facade podspecs (no sources, no headers, a single dependency onReactNativeDependencies); versions/subspecs are derived from the real podspecs inthird-party-podspecs/(SocketRocket synthesized fail-closed fromsocket_rocket_config). Full contract documented inscripts/cocoapods/__docs__/prebuilt-deps.md.feat(ios-prebuild): SocketRocket privacy manifest + Xcode 26 header layout — embed an RN-authored, accurate-empty
PrivacyInfo.xcprivacyfor SocketRocket (upstream ships none), and stage flat public headers intoinclude/so Xcode 26's SwiftPM accepts the header layout.Stacked on #57305 (base:
chrfalch/prebuilt-resources); the SwiftPM preview (#57332) rebases on top of this. Follow-up (separate PR): headers-onlyReactNativeDependenciesHeaders.xcframeworksidecar so SPM auto-serves the deps namespaces andReactNativeHeadersgoes pure-RN.Changelog:
[IOS][CHANGED] - Prebuilt-deps mode: serve third-party headers from the ReactNativeDependencies pod itself and resolve community
s.dependencyon RCT-Folly/glog/boost/etc. via dependency-only facade podsTest Plan
E2E matrix (2026-07-06, locally built deps artifact via
prepare-ios-prebuilds.js):USE_FRAMEWORKS=dynamic— builds (the SocketRocket-regression config)Podfile.lockidentical to baseline🤖 Generated with Claude Code