# XCFrameworks , KMM

**URL:** <https://discuss.kotlinlang.org/t/xcframeworks-kmm/24010>\
**Category:** Native\
**Created:** [January 22, 2022, 6:54am UTC](https://discuss.kotlinlang.org/t/xcframeworks-kmm/24010 "2022-01-22T06:54:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandini-reddyB](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nandini-reddyB](https://discuss.kotlinlang.org/u/nandini-reddyB)\
**Post date:** [January 22, 2022, 6:54am UTC](https://discuss.kotlinlang.org/t/xcframeworks-kmm/24010/1 "2022-01-22T06:54:33Z")

</div>

I was trying to generate the XCFramework with Kotlin 1.5.31 containing the targets for iOSArm64 and iOSX64 .  
I have created a KMM Library as a project and With the below build.gradle.kt , it generates a FatFrameworks . I’m failing to generate XCFrameworks.

> kotlin {
> 
> val xcFramework = XCFramework(libName)
> 
> android()  
> ios {  
> binaries.framework(libName) {  
> xcFramework.add(this)  
> }  
> }  
> sourceSets {  
> val commonMain by getting  
> val commonTest by getting {  
> dependencies {  
> implementation(kotlin(“test-common”))  
> implementation(kotlin(“test-annotations-common”))  
> }  
> }  
> val androidMain by getting {  
> dependencies {  
> implementation(“com.google.android.material:material:1.2.1”)  
> }  
> }  
> val androidTest by getting {  
> dependencies {  
> implementation(kotlin(“test-junit”))  
> implementation(“junit:junit:4.13”)  
> }  
> }  
> val iosMain by getting  
> val iosTest by getting  
> }  
> }

**And I have included the tasks in build.gradle.kts :**

**tasks {**

**register(“** buildDebugXCFramework **”)**

**register(“** buildReleaseXCFramework **”)**

**register(“** publishDevFramework **”)**

**register(“** publishFramework **”)**

**}**

**If Any suggestions to generate XCFrameworks with targets iOSArm64 and iOSX64 ? , it would be helpful , Thank you .**
