Kotlin Tooling Cocoapods Spm Migration
Migrate KMP projects from CocoaPods to SwiftPM with the swiftPMDependencies DSL, keeping CocoaPods active until late.
- CCM score
- 79 of 100
- skills.sh installs
- 2.2K
- GitHub stars
- 1.1K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Kotlin Multiplatform iOS dependency migration: analysis, Gradle and Xcode reconfiguration, import rewrites, and a final MIGRATION_REPORT.md
- Includes 8 phases, plus reference files for troubleshooting and common pod-to-package mappings
- Enforces keeping the
cocoapods {}block until Phase 6, and flags stale workarounds likeallowUsingEmbedAndSignWithCocoaPodsDependencies - Designed for KMP teams on Kotlin 2.4.0-Beta2 or later that need to drop CocoaPods for SwiftPM
Install
$ npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-cocoapods-spm-migration -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
CocoaPods to SwiftPM Migration for KMP
Migrate Kotlin Multiplatform projects from kotlin("native.cocoapods") to swiftPMDependencies {} DSL.
Requirements
- Kotlin: 2.4.0-Beta2 or later (first public release with
swiftPMDependenciessupport, available on Maven Central) - Xcode: 16.4 or 26.0+
- iOS Deployment Target: 16.0+ recommended
Migration Overview
IMPORTANT: Keep the cocoapods {} block and plugin active until Phase 6. The migration adds swiftPMDependencies {} alongside the existing CocoaPods setup first, reconfigures Xcode, and only then removes CocoaPods.
| Phase | Action |
|---|---|
| 1 | Analyze existing CocoaPods configuration |
| 2 | Update Gradle configuration (repos, Kotlin version) |
| 3 | Add swiftPMDependencies {} alongside existing cocoapods {} |
| 4 | Transform Kotlin imports |
| 5 | Reconfigure iOS project and deintegrate CocoaPods |
| 6 | Remove CocoaPods plugin from Gradle |
| 7 | Verify Gradle build and Xcode project build |
| 8 | Write MIGRATION_REPORT.md |
Phase 1: Pre-Migration Analysis
1.0 Verify the project builds
Details
- Repository
- github.com/kotlin/kotlin-agent-skills
- Categories
- Mobile Apps, DevOps & Cloud, Java & JVM
- First seen
- Jun 3, 2026
Questions
What does the kotlin-tooling-cocoapods-spm-migration skill do?
It migrates Kotlin Multiplatform projects from CocoaPods, using kotlin("native.cocoapods"), to Swift Package Manager with the swiftPMDependencies DSL. It replaces pod() with swiftPackage(), transforms cocoapods.* imports to swiftPMImport.*, and reconfigures the Xcode project. The migration runs in phases, keeping the CocoaPods setup active until the final removal step.
What do I need before using the CocoaPods to SwiftPM migration skill?
The skill requires Kotlin 2.4.0-Beta2 or later and Xcode 16.4 or 26.0 or newer. An iOS deployment target of 16.0 or higher is recommended. Projects on an older Kotlin version get a warning that upgrading may bring unrelated breaking changes.
How do I install the kotlin-tooling-cocoapods-spm-migration skill?
Run npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-cocoapods-spm-migration -y in your project. This installs the skill so your agent can use it. The skill then guides the agent through migrating your CocoaPods setup to Swift Package Manager.
Which skills lead the Mobile Apps category, and how does this one stand apart?
This skill sits in the Mobile Apps category alongside vercel-react-native-skills, animate-expo, write-swift, firebase-crashlytics and xcode-project-setup. Unlike those, it focuses on moving a Kotlin Multiplatform project's iOS dependency management from CocoaPods to Swift Package Manager.
More from kotlin/kotlin-agent-skills
All 5Similar to Kotlin Tooling Cocoapods Spm Migration
More Mobile Appskotlin-tooling-agp9-migrationkotlin/kotlin-agent-skills2.5K installsMigration guide for moving Kotlin Multiplatform projects to Android Gradle Plugin 9.0 and its new module layout.
cocoapods-to-spmcap-go/capgo-skills881 installsMigrates Capacitor iOS apps from CocoaPods to Swift Package Manager before CocoaPods Trunk goes read-only.
capacitor-plugin-spm-supportcapawesome-team/skills1.4K installsAdds Swift Package Manager support to an existing Capacitor plugin via a CAPBridgedPlugin Swift migration.
xcode-project-setupfirebase/agent-skills144.7K installsSafe Swift-based tool that adds Swift Packages and links files to Xcode projects without manual .pbxproj edits.
kotlin-tooling-immutable-collections-0-5-x-migrationkotlin/kotlin-agent-skills1.2K installsMigrate Kotlin and Java code from kotlinx.collections.immutable 0.3.x or 0.4.x to 0.5.x renames.
capacitor-plugin-upgrade-v7-to-v8cap-go/capgo-skills724 installsUpgrade Capacitor plugin libraries from v7 to v8 with a migration runner and manual checklist.