Skip to content
cap-go avatar

Capacitor Plugin Spm Support

Add Swift Package Manager support to an existing Capacitor plugin so SPM apps can consume it.

CCM score
72 of 100
skills.sh installs
811
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers root Package.swift naming, CAPBridgedPlugin conversion, removing the ObjC CAP_PLUGIN bridge, and Sources/Tests layout
  • Includes podspec and package.json updates, third-party pod to SPM mapping, resources, binary xcframeworks, and Capacitor 9 Cordova product removal
  • Enforces CLI naming rules so the Package name and .library product both match the npm-derived class name
  • Designed for plugin maintainers preparing for CocoaPods Trunk going read-only, not for app project migrations

Install

$ npx -y skills add cap-go/capgo-skills --skill capacitor-plugin-spm-support -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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/*.h with CAP_PLUGIN(...) and no root Package.swift.
  • An app's npx cap sync ios prints <plugin id> does not have a Package.swift for a plugin the user maintains.
  • A plugin works with CocoaPods but JS gets "X" plugin is not implemented on ios in 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)

Details

Repository
github.com/cap-go/capgo-skills
Categories
Mobile Apps, Skill & Plugin Building
First seen
Jun 3, 2026

Questions

What does the capacitor-plugin-spm-support skill do?

It adds Swift Package Manager support to an existing Capacitor plugin so apps using CapApp-SPM can consume it after CocoaPods Trunk goes read-only. It covers the root Package.swift, converting the class to CAPBridgedPlugin, removing the ObjC bridge, and updating the podspec and package.json files.

Who should use this skill for a Capacitor plugin?

It is for plugin maintainers who own a Capacitor plugin repository with iOS code, especially when app sync warns that a plugin does not have a Package.swift. It is not for app projects or non-Capacitor plugin frameworks, so app migrations should use cocoapods-to-spm instead.

How do I install the capacitor-plugin-spm-support skill?

Run npx -y skills add cap-go/capgo-skills --skill capacitor-plugin-spm-support -y in your project. The agent then gets the instructions to convert the plugin for Swift Package Manager.

Where does this skill stand in the Mobile Apps category?

It sits in the Mobile Apps category alongside vercel-react-native-skills, animate-expo, write-swift, firebase-crashlytics and xcode-project-setup. It is focused on making Capacitor plugins installable in SPM-based apps while keeping their CocoaPods podspec.

More from cap-go/capgo-skills

All 41

Similar to Capacitor Plugin Spm Support

More Mobile Apps