Commit 6b1c23e
feat(spm): B1 flavor architecture — per-config linking + RN-owned embed, no pin
Flavored prebuilt binaries (React, hermes-engine, ReactNativeDependencies)
leave the SwiftPM package graph. The generated ReactNative package vends only
headers-only products (ReactHeaders / ReactNativeHeaders /
ReactNativeDependenciesHeaders); both flavors' framework trees are staged at
add/update time and a per-configuration RN_SPM_FLAVOR build setting selects
one at build time via sdk-conditional link settings; embedding + codesign is
an RN-owned script phase with declared per-config outputs. A Debug/Release
configuration switch is green and flavor-correct on the FIRST build, both
directions, with zero user action.
The flavor pin, swap sandwich, hard-fail + converge, and OBJROOT cache
surgery are deleted (swap-flavor.js and its test suites removed; --flavor
gone from the CLI surface). New flavored-frameworks.js owns staging and
module-map relocation.
Verified: 448 spm unit tests green; Expo E2E on 0.87.0-nightly-20260710-b1test
(existing app + Swift source packages + precompiled frameworks via the
flavoredFrameworks contract): repeated CLI + GUI config flips green and
nm-flavor-correct first build every time, codesign --deep --strict clean,
SwiftOnoneSupport structurally moot, clean migration from the previous
architecture. Untested there: custom configuration names, device/Archive.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent b58841c commit 6b1c23e
29 files changed
Lines changed: 2597 additions & 3695 deletions
File tree
- packages/react-native
- scripts
- codegen/templates
- spm
- __doc__
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 127 | | |
132 | 128 | | |
133 | 129 | | |
| |||
152 | 148 | | |
153 | 149 | | |
154 | 150 | | |
155 | | - | |
156 | | - | |
| 151 | + | |
157 | 152 | | |
158 | 153 | | |
159 | 154 | | |
| |||
172 | 167 | | |
173 | 168 | | |
174 | 169 | | |
175 | | - | |
176 | 170 | | |
177 | 171 | | |
178 | 172 | | |
| |||
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
| |||
0 commit comments