capacitor-plugin-spm-support

Migrates .pdb files to .zbd for compatibility with newer iOS and tvOS versions.

37|1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/capawesome-team/skills --skill capacitor-plugin-spm-support-capawesome-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: capacitor-plugin-spm-support
Source: https://github.com/capawesome-team/skills/tree/main/skills/capacitor-plugin-spm-support
Command: npx skills add https://github.com/capawesome-team/skills --skill capacitor-plugin-spm-support-capawesome-team

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides plugin authors through enabling Swift Package Manager (SPM) support for existing Capacitor plugins by migrating the iOS bridge to Swift and packaging for SPM deployment.

Core Features & Use Cases

  • Create a Package.swift manifest for the plugin and declare iOS platform requirements.
  • Replace Objective-C bridge files with the CAPBridgedPlugin Swift protocol and adjust registration.
  • Update .gitignore to exclude SPM artifacts and align with SwiftPM workflows.
  • Update package.json and project configuration to enable Swift Package Manager resolution and builds.
  • Use case: migrating a plugin with iOS code and CocoaPods dependencies to SPM for smoother downstream integration.

Quick Start

Create a Package.swift for your plugin, migrate the iOS bridge to CAPBridgedPlugin, and resolve iOS dependencies to enable Swift Package Manager.

Frequently Asked Questions about capacitor-plugin-spm-support

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Swift Package Manager support to an existing Capacitor plugin?

To add Swift Package Manager support to a Capacitor plugin, create a Package.swift manifest, migrate the iOS bridge to the CAPBridgedPlugin Swift protocol, and update package.json to enable SPM resolution.

Why do I need to migrate the iOS bridge to Swift when adding SPM support?

Migrating the iOS bridge to Swift is required for SPM support because you must replace Objective-C bridge files with the CAPBridgedPlugin Swift protocol to ensure proper plugin registration within Swift Package Manager workflows.

Can I use SPM support for a Capacitor plugin that only has CocoaPods metadata?

Yes, this migration applies to plugins with existing iOS implementations and CocoaPods metadata. You can package them for SPM by creating a Package.swift manifest and resolving iOS dependencies for downstream integration.

What's the best way to align a Capacitor plugin with SPM workflows and avoid committing build artifacts?

Update .gitignore to exclude SPM artifacts and align with SwiftPM workflows. You must also align the Package.swift manifest with the Capacitor major version to ensure compatibility during Swift Package Manager resolution.

Does adding SPM support to a Capacitor plugin require changing the project configuration?

Yes, adding SPM support requires updating package.json and project configuration to enable Swift Package Manager resolution and builds, alongside creating Package.swift and migrating the bridge code to CAPBridgedPlugin.

What limitations exist when migrating a Capacitor plugin from CocoaPods to SPM?

This SPM migration requires existing iOS implementations and CocoaPods dependencies. Plugins without current iOS code cannot use this process, and all bridge files must be successfully migrated to the CAPBridgedPlugin Swift protocol.