Skip to content

Conversation

@andredestro
Copy link
Contributor

No description provided.

Copy link
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro left a comment

Choose a reason for hiding this comment

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

I don't think this will work as it stands now. The plugin needs to have Package.swift when publishing to npm (it has a reference in package.json -> files array), and because the plugin doesn't have the Package.swift in packages/capacitor-plugin now, it wouldn't work when users install the plugin from npm and use it in an iOS app with SPM

Copy link
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro left a comment

Choose a reason for hiding this comment

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

LGTM.

Generated a dev release and finding the correct Package.swift there, and was also able to add the plugin from the PR's branch as a Swift Package in an iOS App in Xcode.

The one thing I could see as a limitation with this approach is if we wanted to use the plugin in an example app in this repository; but we could probably work around it by having Package.swift entry in packages/capacitor-plugin/.gitignore and then doing what you have in prepack as apart of npm run build or something like that. Anywho, not necessary for this PR I think, so I'm approving

@andredestro andredestro merged commit 7334e2e into main Jan 28, 2026
8 checks passed
@andredestro andredestro deleted the spm branch January 28, 2026 09:42
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