
Kotlin Tooling Cocoapods Spm Migration
If you're maintaining a Kotlin Multiplatform project and need to move from CocoaPods to Swift Package Manager, this automates the grunt work. It handles the full migration path: bumps your Kotlin version to 2.4.0-Beta2 or later (when swiftPMDependencies support landed), transforms pod() declarations to swiftPackage() calls, rewrites cocoapods.* imports to swiftPMImport.*, and reconfigures your Xcode project. The eight-phase approach keeps CocoaPods active until SwiftPM is wired up, which reduces the window where nothing builds. Watch out if you have third-party KMP libraries that bundle their own cinterop klibs, those imports stay as-is. Built by JetBrains, so it tracks the official migration pattern they documented.
- skills.sh installs
- 2K
- GitHub stars
- 1.1K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-cocoapods-spm-migration --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/kotlin/kotlin-agent-skills
- Categories
- AI & Agent Building, Mobile Development, Java & JVM
- First seen
- Jun 3, 2026