Skip to content

Add Swift Package Manager manifest (React Native 0.87 SwiftPM) - #722

Closed
serpixel wants to merge 1 commit into
gre:masterfrom
serpixel:swiftpm-manifest
Closed

serpixel wants to merge 1 commit into
gre:masterfrom
serpixel:swiftpm-manifest

Conversation

@serpixel

@serpixel serpixel commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Adds Package.swift + the scaffold prefix header for react-native-view-shot 6.0.1, generated with RN 0.87.1's react-native spm scaffold (RN's documented path for community libraries) and validated with swift package dump-package (swift-tools-version 6.0).

Generated with RN 0.87.1's `react-native spm scaffold` from the podspec and
validated with `swift package dump-package` (swift-tools-version 6.0). The
two React path dependencies resolve through RN 0.87's autolinking alias at
app resolve time (same shape react-native-safe-area-context ships); they do
not resolve in a bare clone. CocoaPods users are unaffected.

Needed for React Native 0.87 SwiftPM autolinking, where autolinked native
libraries without a manifest fail the package resolve.
@gre
gre requested a balanced review from Copilot October 7, 2026 08:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The SwiftPM target omits the library’s privacy manifest resource.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds SwiftPM support for React Native 0.87 autolinking while retaining CocoaPods support.

Changes:

  • Adds a Swift 6 package manifest for the iOS native module.
  • Adds an Objective-C prefix header for SwiftPM compilation.
File Description
Package.swift Defines the SwiftPM library target and React Native dependencies.
react-native-spm-prefix.h Supplies implicit Foundation and UIKit imports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Package.swift
"ios/RNViewShot.h",
"ios/RNViewShot.mm",
],
publicHeadersPath: "ios",
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.

2 participants