[feat] add local iOS SPM package output#358
Merged
Merged
Conversation
6418700 to
d3f3898
Compare
hurali97
reviewed
Jun 1, 2026
|
|
||
| 1. Select your host app target | ||
| 2. Open the **General** tab | ||
| 3. Under **Frameworks, Libraries, and Embedded Content**, add the package product named after your packaged framework, for example `BrownfieldLib` |
Member
There was a problem hiding this comment.
Not sure what this means? Does this step says how to add Package.swift to the Host App?
Member
There was a problem hiding this comment.
If not, perhaps we can add a note:
"Go to Project -> Package Dependencies -> Click on + -> Add Local -> Select the directory with Package.swift file, in this case it should be under `.brownfield/package/build"
Collaborator
Author
There was a problem hiding this comment.
Clarified this in the docs. It now explicitly says to open the host app project in Xcode, go to Package Dependencies, click +, choose Add Local..., and select the .brownfield/package/build directory containing Package.swift.
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
--add-spm-packagetobrownfield package:iosso iOS packaging can emit a local Swift Package next to the packaged XCFrameworksPackage.swiftandREADME.md, and normalize copiedspm-artifactsfor local SPM consumption, including Hermes, ReactBrownfield, Brownie, BrownfieldNavigation, plusReactandReactNativeDependencieswhen presentprepareXCFrameworks.jsrewriting Swift sourcesWhy
We want an incremental path toward Swift Package Manager consumption of packaged RN iOS artifacts before the wider RN core migration lands.
During validation, two follow-up issues showed up and are included in this PR:
prepareXCFrameworks.jssource rewriting, which the local SPM path does not runValidation
yarn workspace @callstack/brownfield-cli lintyarn workspace @callstack/brownfield-cli typecheckyarn workspace @callstack/brownfield-cli testcorepack yarn workspace @callstack/brownfield-cli test src/brownfield/utils/__tests__/createLocalSpmPackage.test.tsapps/RNApp, added it toAppleAppin Xcode, and confirmed the host app builds and runs without Metroapps/ExpoApp55, added it toAppleAppin Xcode, and confirmed the host app builds, installs, and launchesNotes