# 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](<https://devfeed.tech/topics/kotlin.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [framework](<https://devfeed.tech/tags/framework.md>), [generate](<https://devfeed.tech/tags/generate.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [macos](<https://devfeed.tech/tags/macos.md>), [mono-repo](<https://devfeed.tech/tags/mono-repo.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [platform](<https://devfeed.tech/tags/platform.md>)

## AI overview

Kotlin Multiplatform produces separate iOS frameworks, which the excerpt says can be combined into a FatFramework for simulator and device architectures. The author presents XCFrameworks as Apple's preferred way to package multiple platform-specific variants, but notes that Kotlin Multiplatform did not yet support them natively when the article was written. The proposed workaround is to assemble an XCFramework manually from KMP-built frameworks, with scripting to avoid repeating the process; official KMP support is noted as available from Kotlin 1.5.30. The excerpt ends before showing the build steps.

## 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"