移动开发

cocoapods-to-spm

cap-go/capgo-skills

Migrates an existing Capacitor iOS app from CocoaPods to Swift Package Manager (SPM) before CocoaPods Trunk goes read-only (expected December 2, 2026). Use when the app still has ios/App/Podfile, Pods/, Podfile.lock or App.xcworkspace and the user wants CapApp-SPM, runs or recovers from `npx cap spm-migration-assistant`, needs debug.xcconfig / CAPACITOR_DEBUG wired up, sees "Some installed Capacitor plugins are not compatible with SPM" or "<plugin> does not have a Package.swift", or plans the Capacitor 9 upgrade where SPM is the default. Do not use for adding SPM support inside a plugin repository (use capacitor-plugin-spm-support), the UIScene lifecycle migration (use capacitor-uiscene-migration), full version upgrades (use capacitor-app-upgrades), or generic iOS build debugging (use debugging-capacitor).

  • 803 次安装
  • 74 星标
  • 收录于

安装命令

npx skills add https://github.com/cap-go/capgo-skills --skill cocoapods-to-spm

SKILL.md

CocoaPods to Swift Package Manager Migration

Move a Capacitor iOS app from CocoaPods to SPM without losing native project customizations.

When to Use

TRIGGER when:

  • ios/App/Podfile, Pods/, Podfile.lock, or App.xcworkspace exists and the user wants SPM.
  • User asks about npx cap spm-migration-assistant, CapApp-SPM, debug.xcconfig, or --packagemanager SPM.
  • User worries about CocoaPods Trunk becoming read-only (expected December 2, 2026), or about pods that can no longer be published/updated.
  • npx cap sync warns Some installed Capacitor plugins are not compatible with SPM or <plugin id> does not have a Package.swift.
  • Upgrading to Capacitor 9 and wanting to drop CocoaPods at the same time.

Do not use:

  • Adding Package.swift / CAPBridgedPlugin to a plugin you maintain -> capacitor-plugin-spm-support.
  • SceneDelegate / UIScene adoption (Capacitor 8.5+, required by Xcode 27) -> capacitor-uiscene-migration.
  • The Capacitor major upgrade itself -> capacitor-app-upgrades, capacitor-app-upgrade-v8-to-v9.
  • Build or runtime failures unrelated to dependency management -> debugging-capacitor.