
Capacitor Plugin Spm Support
If you're maintaining a Capacitor plugin and want iOS developers to install it through Swift Package Manager instead of CocoaPods, this walks you through the conversion. It covers creating the Package.swift manifest, converting your plugin class to use CAPBridgedPlugin with the right identifier and method registration, cleaning up the old Objective-C bridge files, and updating your package exports. The workflow is systematic: gather info from your podspec and existing code, set up the SPM structure, switch to Swift-based bridging, then verify with cap sync in your test app. It's aimed squarely at plugin maintainers, not app developers trying to consume plugins.
- skills.sh installs
- 756
- GitHub stars
- 77
- last updated
- Aug 21, 2026
Install
$ npx -y skills add cap-go/capgo-skills --skill capacitor-plugin-spm-support --agent claude-codeInstalls into .claude/skills of the current project.
Files
Add Swift Package Manager Support to a Capacitor Plugin
Make a plugin installable in SPM-based Capacitor apps while keeping its podspec for CocoaPods apps.
When to Use
TRIGGER when:
- A plugin repo has
ios/Plugin/*.swift+*.m/*.hwithCAP_PLUGIN(...)and no rootPackage.swift. - An app's
npx cap sync iosprints<plugin id> does not have a Package.swiftfor a plugin the user maintains. - A plugin works with CocoaPods but JS gets
"X" plugin is not implemented on iosin SPM apps. - Preparing a plugin for Capacitor 9 / CocoaPods Trunk read-only.
Do not use:
- App-side CocoaPods removal ->
cocoapods-to-spm. - Capacitor major bumps of a plugin ->
capacitor-plugin-upgrades,capacitor-plugin-upgrade-v8-to-v9. - Android-only plugin work, or non-Capacitor (pure Cordova, React Native) plugins.
Rules the CLI Enforces (non-obvious)
Sponsors
Details
- Repository
- github.com/cap-go/capgo-skills
- Categories
- AI & Agent Building, Marketing & SEO, Mobile Development
- First seen
- Jun 3, 2026
More from cap-go/capgo-skills
All 41- Capgo Native Builds754
- Capgo Release Management749
- Capgo Release Workflows749
- Sqlite To Fast Sql749
- Capacitor App Upgrade V7 To V8744
- Capgo Cloud731
- Capgo Organization Management725
- Ionic Enterprise Sdk Migration719
- Skill Creator718
- Ionic Appflow Migration690
- Capacitor Plugin Upgrade V7 To V8683
- Capacitor App Upgrade V6 To V7680
- Capacitor Best Practices2.9K
- Capacitor Plugins1.7K
- Ionic Design1.6K
- Debugging Capacitor1.4K
- Safe Area Handling1.4K
- Capacitor Testing1.4K
- Capacitor Deep Linking1.3K
- Ios Android Logs1.3K
- Capacitor Security1.3K
- Capacitor Accessibility1.3K
- Capacitor Performance1.3K
- Capacitor App Store1.2K