Skip to content

fix(ui): support React Native SwiftPM integration - #213

Open
mrousavy wants to merge 1 commit into
mainfrom
mrousavy/ui-swiftpm
Open

mrousavy wants to merge 1 commit into
mainfrom
mrousavy/ui-swiftpm

Conversation

@mrousavy

Copy link
Copy Markdown
Contributor

What is this?

Adds SwiftPM support to @react-native-harness/ui, so iOS apps using React Native's SwiftPM integration can build the native UI module without a local package patch.

Fixes #212.

How does it work?

The npm package includes a HarnessUI manifest and its swiftpmConfig name. The manifest uses React Native's autolinking layout to resolve React headers and the generated HarnessUISpec, and matches React's Debug/Release C++ definitions. Explicit Foundation/UIKit imports replace the imports supplied by CocoaPods' prefix header. The existing podspec remains available.

The installation docs cover SwiftPM, and a version plan includes this in the next release.

Testing

  • Built the native SwiftPM package for arm64 iOS Simulator in Debug and Release against React Native 0.88, compiling all three Objective-C++ files without a prefix header.
  • Verified the npm package includes Package.swift and the native sources.
  • pnpm build:all, pnpm lint:all, pnpm test:all, and pnpm typecheck:all pass.

The native checks build the UI package in an external fixture; they do not run a full app or UI tests.

Why is this useful?

Apps can keep using Harness UI tests after moving from CocoaPods to SwiftPM. This replaces the packaging workaround used in Nitro's SwiftPM migration.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-native-harness Ready Ready Preview Oct 19, 2026 2:12pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — ab85893a Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support SwiftPM in @react-native-harness/ui

1 participant