What problem does it solve?
This skill automates the complex, error-prone process of adding Swift Package Manager (SPM) support to an existing Capacitor plugin by creating a Package.swift manifest, migrating Objective-C bridge integrations to the CAPBridgedPlugin Swift protocol, and cleaning up Xcode and package configuration so the plugin can be consumed via SPM.
Core Features & Use Cases
- Automated Manifest Creation: Generates a Package.swift using the podspec and package.json metadata, including platform targets, products, dependencies, and targets.
- Bridge Migration: Replaces Objective-C bridge files by updating the Swift plugin class to conform to CAPBridgedPlugin and injecting identifier, jsName, and pluginMethods metadata.
- Project Cleanup & Validation: Removes ObjC files, prunes references from the Xcode project, updates .gitignore and package.json, and provides guidance for resolving CocoaPods-to-SPM dependency mappings.
- Use Case: Convert an existing Capacitor plugin that currently distributes via CocoaPods into an SPM-compatible package so it can be integrated into Swift Package Manager workflows.
Quick Start
Use the capacitor-plugin-spm-support skill to add SPM support to the plugin in the current repository by creating Package.swift, migrating the Objective-C bridge to CAPBridgedPlugin, removing bridge files, updating the Xcode project, and adjusting package.json and .gitignore.