# How to build an XCFramework on Kotlin Multiplatform

DevFeed: [How to build an XCFramework on Kotlin Multiplatform](<https://devfeed.tech/articles/how-to-build-an-xcframework-on-kotlin-multiplatform-25554.md>)

Original publisher: [Read original article](<https://www.marcogomiero.com/posts/2021/build-xcframework-kmp/>)

Author: Marco Gomiero

Published: 2021-07-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Posts on Marco Gomiero](<https://devfeed.tech/sources/posts-on-marco-gomiero.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [macOS](<https://devfeed.tech/topics/macos.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [macos](<https://devfeed.tech/tags/macos.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

## AI overview

This tutorial explains how to build an XCFramework for Kotlin Multiplatform when integrating KMP into an existing project. It describes KMP-generated platform libraries, the limitations of FatFrameworks, and the manual scripting approach needed before native XCFramework support arrived in Kotlin 1.5.30.

## Source excerpt

When you start integrating Kotlin Multiplatform (I'll call it KMP in the rest of the article) in an existing project you most likely don't have a mono-repo structure (and making a refactor to achieve this kind of architecture will not be easy). An example of architecture is the following, with a repository for every platform. To understand how to integrate KMP into existing code, give a look at my previous article: "Introducing Kotlin Multiplatform in an existing project"