Skip to content

fix(ios): declare the SwiftPM name so autolinking works on React Native 0.88 - #777

Merged
gre merged 1 commit into
gre:masterfrom
m-bert:declare-swiftpm-name
Nov 28, 2026
Merged

gre merged 1 commit into
gre:masterfrom
m-bert:declare-swiftpm-name

Conversation

@m-bert

@m-bert m-bert commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Note

This PR was prepared by Claude Fable 5.2 on behalf of @m-bert

On React Native 0.88, SwiftPM autolinking names a library after its podspec unless swiftpmConfig.name is set in package.json. For this library that gives react-native-view-shot, while Package.swift calls the product ReactNativeViewShot, so the build fails:

product 'react-native-view-shot' required by package 'autolinking' target 'AutolinkedAggregate' not found in package 'react-native-view-shot'.

This PR declares the name in package.json. React Native 0.87 and CocoaPods do not read the field. CI does not catch the failure because build-ios-spm runs on 0.87.1, which derives the name from the npm package.

Tested with 6.2.1 in a React Native 0.88.1 app on SwiftPM: without the field the build fails as above; with it the build succeeds and a capture works at runtime.

Copilot AI balanced review requested due to automatic review settings November 27, 2026 17:35

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gre

gre commented Nov 28, 2026

Copy link
Copy Markdown
Owner

thanks

@gre
gre merged commit c31aefc into gre:master Nov 28, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 28, 2026
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.

3 participants