fix(ios): support Cordova plugins with Package.swift#8438
Merged
jcesarmobile merged 2 commits intomainfrom Apr 27, 2026
Merged
Conversation
Contributor
OS-pedrogustavobilro
left a comment
There was a problem hiding this comment.
I'm still running more tests with different apps and combinations of plugins, but had noticed this here and just asking to see if it's relevant.
OS-pedrogustavobilro
approved these changes
Apr 27, 2026
Contributor
OS-pedrogustavobilro
left a comment
There was a problem hiding this comment.
Tested on a few different apps with different plugins (Capacitor, Cordova with Package.swift, Cordova without Package.swift and without any dependencies), it's working good!
OS-ruimoreiramendes
approved these changes
Apr 27, 2026
jcesarmobile
added a commit
that referenced
this pull request
Apr 27, 2026
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.
If the Cordova plugin already has a Package.swift, point to that file instead of generating a new one, but patching the repository url and version to point to the Capacitor one, also, in that case, don't copy the plugin files to
capacitor-cordova-ios-pluginsfolder since it will be using the ones innode_modulesAlso fixes an issue where the plugin files were copied to
capacitor-cordova-ios-plugins/sourcesstatic/pluginNamebut thePackage.swiftwas being generated, and pointed tocapacitor-cordova-ios-plugins/sources/pluginNameand failed to link the plugin since it had no files. Thesourcesstaticfolder is only needed for some CocoaPods plugins, not when using SPM.