kotlin avatar

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

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

Sponsors

Details

Repository
github.com/kotlin/kotlin-agent-skills
Categories
AI & Agent Building, Mobile Development, Java & JVM
First seen
Jun 3, 2026

More from kotlin/kotlin-agent-skills

All 5
1k-dense-ai avatarpyopenmsk-dense-ai/scientific-agent-skillsComplete mass spectrometry analysis platform. Use for proteomics and metabolomics workflows—feature detection, peptide/protein identification, label-free and is2Kskills.sh installs
2k-dense-ai avatardnanexus-integrationk-dense-ai/scientific-agent-skillsBuild and operate reproducible genomics workloads on DNAnexus with the dx CLI, dxpy, apps/applets, native workflows, dxCompiler, and Nextflow. Use for DNAnexus 2Kskills.sh installs
3k-dense-ai avatarqutipk-dense-ai/scientific-agent-skillsSimulate and audit closed and open quantum-system models with QuTiP 5, including deterministic, trajectory, steady-state, spectral, and phase-space workflows. U2Kskills.sh installs
4k-dense-ai avatarrowank-dense-ai/scientific-agent-skillsRowan is a cloud-native molecular modeling and medicinal-chemistry workflow platform with a Python API. Use for pKa and macropKa prediction, conformer and tauto2Kskills.sh installs
5k-dense-ai avataromero-integrationk-dense-ai/scientific-agent-skillsSecurely inspect and automate microscopy data workflows against OMERO.server with omero-py, BlitzGateway, OMERO CLI, tables, annotations, ROIs, rendering, and d2Kskills.sh installs
6k-dense-ai avataropentrons-integrationk-dense-ai/scientific-agent-skillsAuthor, review, migrate, simulate, and troubleshoot official Opentrons Python Protocol API v2 protocols for Flex and OT-2 robots. Use for robot-specific liquid 2Kskills.sh installs