Repository navigation
feat(cli): allow extra XCFrameworks in local SPM package - #514
Merged
hurali97 merged 2 commits intoNov 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The change still has active moderate and critical issues that can stage artifacts outside the package, delete required frameworks, or generate invalid and potentially injectable Swift code.
3 open issues
What changed in this PR
Adds support for configuring host-side XCFrameworks through ios.extraSpmXcframeworks, allowing package:ios --add-spm-package to include them as binary targets in the generated local Swift package.
Changes:
- Adds TypeScript and JSON schema configuration for extra XCFrameworks.
- Stages declared XCFrameworks and includes them in
Package.swift. - Reserves configured framework names during automatic detection.
- Adds CLI forwarding, tests, documentation, and a changeset.
Review findings:
- Critical: XCFramework names must be validated as safe Swift identifiers and filesystem path segments.
- Moderate: Reserved/generated names and duplicate extra entries must be rejected before staging.
- Moderate: Symlinked XCFramework paths must be resolved safely before copying.
This pull request requires changes.
| File | Summary |
|---|---|
packages/cli/src/types.ts |
Defines extra SPM XCFramework configuration and packaging options. |
packages/cli/src/brownfield/utils/createLocalSpmPackage.ts |
Stages extra XCFrameworks and adds them to the generated SPM package. |
packages/cli/src/brownfield/utils/__tests__/createLocalSpmPackage.test.ts |
Tests copying, resolution, missing paths, ordering, and path handling. |
packages/cli/src/brownfield/commands/packageIos.ts |
Forwards project-root and extra XCFramework configuration to package generation. |
packages/cli/src/brownfield/commands/__tests__/packageIos.action.test.ts |
Verifies forwarding of extra XCFramework configuration. |
packages/cli/src/__tests__/config.test.ts |
Tests valid and malformed extra XCFramework configuration. |
packages/cli/schema.json |
Adds schema validation for ios.extraSpmXcframeworks. |
docs/docs/docs/cli/brownfield.mdx |
Documents extra XCFramework support in the CLI guide. |
docs/docs/docs/api-reference/configuration.mdx |
Documents the new iOS configuration option. |
.changeset/extra-spm-xcframeworks.md |
Records the CLI feature release. |
Review effort: Lite
hurali97
approved these changes
Nov 10, 2026
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
ios.extraSpmXcframeworkssopackage:ios --add-spm-packagecan include host-side XCFrameworks as SPM binary targetsTest plan
closes #468