kotlin-tooling-cocoapods-spm-migration

Automates CocoaPods-to-SwiftPM migration for Kotlin Multiplatform projects.

992|38|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/Kotlin/kotlin-agent-skills --skill kotlin-tooling-cocoapods-spm-migration-kotlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-tooling-cocoapods-spm-migration
Source: https://github.com/Kotlin/kotlin-agent-skills/tree/main/skills/kotlin-tooling-cocoapods-spm-migration
Command: npx skills add https://github.com/Kotlin/kotlin-agent-skills --skill kotlin-tooling-cocoapods-spm-migration-kotlin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrate Kotlin Multiplatform projects from CocoaPods to Swift Package Manager by updating Gradle configuration, transforming cocoapods.* imports to swiftPMImport.*, and reconfiguring the iOS integration workflow.

Core Features & Use Cases

  • Adds swiftPMDependencies alongside existing CocoaPods configuration to enable SwiftPM-based linking.
  • Transforms Kotlin import namespaces from cocoapods.* to swiftPMImport.* and updates iOS integration wiring to reflect SwiftPM usage.
  • Reconfigures iOS project wiring (embedAndSign, linkage packaging) and Phase 5 integration steps to complete migration in a single module.
  • Used when migrating a KMP module that depends on CocoaPods libraries to SwiftPM without breaking builds.

Quick Start

Run the migration on the target module to convert CocoaPods pods to SwiftPM dependencies and adjust Xcode project wiring.

Frequently Asked Questions about kotlin-tooling-cocoapods-spm-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a Kotlin Multiplatform project from CocoaPods to SwiftPM?

Migrate Kotlin Multiplatform projects from CocoaPods to SwiftPM by adding swiftPMDependencies in Gradle, converting cocoapods imports to swiftPMImport, and reconfiguring iOS project wiring in Xcode to update framework embedding and linkage packaging.

What does converting cocoapods imports to swiftPMImport involve in KMP?

Converting cocoapods imports to swiftPMImport involves transforming Kotlin namespace declarations from cocoapods.* to swiftPMImport.* and updating iOS integration wiring to reflect SwiftPM usage without breaking existing module builds.

Can I use Swift Package Manager with existing CocoaPods dependencies in KMP?

Yes, SwiftPM can be introduced alongside existing CocoaPods configuration by adding swiftPMDependencies to enable SwiftPM-based linking, allowing a gradual migration path for your iOS modules before removing CocoaPods artifacts.

What is the best way to reconfigure Xcode project settings for SwiftPM in KMP?

The best way to reconfigure Xcode project settings for SwiftPM in KMP is to update embedAndSign configurations, adjust linkage packaging, and apply Phase 5 integration steps to complete the migration in a single module.

When should I remove CocoaPods artifacts during a SwiftPM migration?

CocoaPods artifacts should be removed in Phase 6 of the migration process, after swiftPMDependencies have been added, imports transformed, and iOS project wiring successfully reconfigured across Gradle and Xcode integrations.

Does migrating KMP modules from CocoaPods to SwiftPM break iOS builds?

Migrating KMP modules from CocoaPods to SwiftPM does not break iOS builds when properly executing namespace transformations and updating Pod and Xcode settings, ensuring continuous framework integration throughout the migration workflow.