From capacitor-plugin-dev
Adds Swift Package Manager support to existing Capacitor iOS plugins by creating Package.swift, converting to CAPBridgedPlugin, removing Objective-C bridges, and updating manifests. For Xcode SPM integration without CocoaPods.
How this skill is triggered — by the user, by Claude, or both
Slash command
/capacitor-plugin-dev:capacitor-plugin-spm-supportThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Add SPM support to an existing Capacitor plugin so it can be consumed without CocoaPods.
Add SPM support to an existing Capacitor plugin so it can be consumed without CocoaPods.
Read these files in the plugin root:
package.json.podspecios/Record:
Package.swiftAdd a Package.swift manifest that:
Keep the target structure aligned with the actual plugin source tree.
Update the plugin class to conform to CAPBridgedPlugin.
Add the bridge properties at the top of the class:
identifierjsNamepluginMethodsPreserve each method name and return type exactly as the plugin already exposes them.
Delete the old bridge header and implementation files once the Swift bridge is in place.
Then clean the Xcode project file so it no longer references them.
Update the plugin package manifest so it exports:
Package.swiftAdd an iOS SPM install command if the project maintains script helpers.
Install dependencies with the repository's existing package manager.
Then cd into the example or test app directory that contains capacitor.config.*, run npx cap sync (or the repository's equivalent runner) there, and build that same app.
identifier, and jsName against the exported API.npx claudepluginhub cap-go/capgo-skills --plugin capacitor-plugin-devMigrates Capacitor iOS apps from CocoaPods to Swift Package Manager (SPM), using spm-migration-assistant, generating CapApp-SPM/Package.swift, adding debug.xcconfig, verifying plugin SPM support, and removing Podfile/Pods.
Upgrades Capacitor plugins to newer major versions by aligning dependencies, updating iOS/Android native code, verifying example apps, and handling multi-version jumps.
Adds Swift Packages and links files to Xcode projects (.pbxproj). Invoked automatically when iOS dependencies like Firebase or Alamofire need installation.