cap-go avatar

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-code

Installs 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/*.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)

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
1rand avataranti-sloprand/cc-polymathComprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language, code, and design. Use when revie753skills.sh installs
2mvanhorn avatarpp-contact-goatmvanhorn/printing-press-librarySuper LinkedIn for the terminal. Search, enrich, and map warm-intro paths across LinkedIn (stickerdaniel/linkedin-mcp-server subprocess), Happenstance (cookie-f752skills.sh installs
3zhinkgit avatarcanzhinkgit/embeddedskills嵌入式 CAN / CAN-FD 调试工具,用于扫描接口、监控报文、发送测试帧、记录日志、数据库文件解码和总线统计。 当用户提到 CAN、CAN-FD、DBC 解码、总线抓包、USB-CAN 联调、报文发送、总线统计、 PCAN、Vector、slcan、CAN 接口扫描、CAN ID 过滤、ASC 日志、BLF 文件751skills.sh installs
4cap-go avatarcapgo-release-managementcap-go/capgo-skillsGuides the agent through Capgo OTA release workflows including bundle uploads, compatibility checks, channels, cleanup, and encryption key setup. Use when manag749skills.sh installs
5cap-go avatarcapgo-release-workflowscap-go/capgo-skillsGuides the agent through setting up Capgo-centered release workflows for Capacitor apps. Use when the user needs a unified path for live updates, native builds,749skills.sh installs
6cap-go avatarsqlite-to-fast-sqlcap-go/capgo-skillsGuides the agent through migrating SQLite and SQL-style Capacitor plugins to @capgo/capacitor-fast-sql. Use when replacing bridge-based SQL plugins, adding encr749skills.sh installs