You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dd369dd
Browse filesBrowse the repository at this point in the historyBrowse files
docs(swiftpm): correct SwiftPM docs to match current scripts
Fix statements in the SwiftPM and ios-prebuild __docs__ that no longer
match the code: CLI options, exit code 2 causes, what sync does and when
it re-runs, which command writes each file, header products, remote mode,
and header sidecar layout. Add an environment variables table.
|`#import <folly/dynamic.h>`|SwiftPM: the `ReactNativeDependenciesHeaders` sidecar's `Headers/` (deps namespaces are not in `ReactNativeHeaders`)| R2 |
|`#import "RCTFabricComponentsPlugins.h"` (quoted, community Fabric pods) | CocoaPods only: re-vended by the `React-RCTFabric` facade into the pod header map (`rncore_facades.rb`, `FACADE_REEXPOSED_HEADERS`) | — |
302
303
303
-
-**SwiftPM**: both xcframeworks are plain `.binaryTarget`s; Xcode auto-serves
304
-
`React.framework`'s `Headers/`+`Modules/` and `ReactNativeHeaders`' `Headers/`
305
-
(incl. its `module.modulemap`) to dependents. Zero flags.
304
+
-**SwiftPM**: `React.xcframework` is not in the package graph. Its headers are
305
+
copied into `ReactHeadersTarget/include/React` with the module map rewritten
306
+
to a plain `module React`, vended as the `ReactHeaders` target. The only
307
+
`.binaryTarget`s are `ReactNativeHeaders` and
308
+
`ReactNativeDependenciesHeaders`; Xcode auto-serves their `Headers/` (incl.
| R10 umbrella check | a probed namespace loses all modular headers |`planFromInventory`|
318
322
| R5 exemption assert | an invalid-module-identifier namespace gains a modular-candidate header |`planFromInventory`|
319
-
| Deps namespace guard (missing) | folly/glog/… not staged at compose time |`buildReactNativeHeadersXcframework`|
320
-
| Deps namespace guard (undeclared) | the deps artifact ships a namespace not in `DEPS_NAMESPACES` (new third-party dep) |`buildReactNativeHeadersXcframework`|
323
+
| Deps namespace guard (missing) | folly/glog/… not staged at compose time |`buildDepsHeadersXcframework`|
324
+
| Deps namespace guard (undeclared) | the deps artifact ships a namespace not in `DEPS_NAMESPACES` (new third-party dep) |`buildDepsHeadersXcframework`|
321
325
| Include-health ratchet | a shipped header gains a `notShipped`/`unresolved`/quoted-unresolvable include not in the committed baseline |`headers-verify.js`|
322
326
| Structural gate | composed module maps/umbrellas differ from the spec render; R9 headers or deps dirs absent |`headers-verify.js`|
323
327
| Compile gates | the React module, any R5 namespace module, the R10 umbrella, the R9 textual (Expo-shape) surface, or Swift `RCTBridge.moduleRegistry` fails to compile |`headers-verify.js` (CI: prebuild compose job) |
|[spm-scripts.md](./spm-scripts.md)| The tool itself: CLI surface, the six-step pipeline, [every file it creates or modifies](./spm-scripts.md#files-the-tool-touches), the two auto-sync hooks, and how Debug/Release flavor selection works. |
55
-
|[spm-header-paths-contract.md](./spm-header-paths-contract.md)| How headers and package references resolve. The contract is **zero-`-I`**: no header search paths and no `unsafeFlags` in any generated manifest. Also covers remote mode.|
55
+
|[spm-header-paths-contract.md](./spm-header-paths-contract.md)| How headers and package references resolve. The contract is **zero-`-I`**: no generated manifest carries a search path into React Native's own headers. Also covers remote mode. |
56
56
|[spm-autolinking-plugins.md](./spm-autolinking-plugins.md)| The extension seam for frameworks with their own module system (Expo is the first consumer): discovery, the full context/return contract including `flavoredFrameworks`, `watchPaths` and `scriptPhases`, and failure behavior. |
57
57
58
58
Two ideas explain most of the architecture:
@@ -83,7 +83,8 @@ Two ideas explain most of the architecture:
83
83
local `React-GeneratedCode` package rather than a Pod.
84
84
-**`@react-native-community/cli config`** — supplies the autolinking metadata
85
85
(`autolinking.json`) that the SwiftPM autolinker turns into a `Package.swift`.
86
-
Overridable via `--configCommand`.
86
+
Overridable via the `RCT_SPM_AUTOLINKING_CONFIG_COMMAND` environment variable,
87
+
or `--config-command` when running `setup-apple-spm.js` directly.
0 commit comments