Skip to content
kotlin avatar

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
View on GitHub

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 like allowUsingEmbedAndSignWithCocoaPodsDependencies
  • 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 -y

Installs 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 swiftPMDependencies support, 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.

PhaseAction
1Analyze existing CocoaPods configuration
2Update Gradle configuration (repos, Kotlin version)
3Add swiftPMDependencies {} alongside existing cocoapods {}
4Transform Kotlin imports
5Reconfigure iOS project and deintegrate CocoaPods
6Remove CocoaPods plugin from Gradle
7Verify Gradle build and Xcode project build
8Write 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 5

Similar to Kotlin Tooling Cocoapods Spm Migration

More Mobile Apps