jean
12/04/2023, 8:58 AMassembleXCFramework
error: the path does not point to a valid framework: /Users/jeantuffier/Repos/Entur/Tavla/CommonTavla/build/common_tavlaXCFrameworkTemp/fatframework/debug/iosSimulator/common_tavla.framework
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':assembleCommon-tavlaDebugXCFramework'.
> Process 'command 'xcodebuild'' finished with non-zero exit value 70
any ideas how I can fix that?jean
12/04/2023, 8:59 AMassembleXCFramework
• assembleDebugXCFramework
• assembleReleaseXCFramework
But I get Task 'assembleDebugXCFramework' not found in root project 'common-tavla'.
Andrei Salavei
12/04/2023, 9:30 AM./gradlew tasks
to verify if task you mentioned existsjean
12/04/2023, 11:34 AMassemble[PROJECT_NAME]DebugXCFramework
jean
12/04/2023, 12:59 PMxcodebuild
is used. And running xcodebuild
from the xcode project consuming the library, I don’t get any errorjean
12/04/2023, 1:10 PMassembleXCFramework
from the command line with --stacktrace
gave me this
w: Name of XCFramework 'common-tavla' differs from inner frameworks name 'CommonTavla'! Framework renaming is not supported yet
error: the path does not point to a valid framework: /Users/jeantuffier/Repos/Entur/Tavla/CommonTavla/build/common_tavlaXCFrameworkTemp/fatframework/debug/iosSimulator/common_tavla.framework
It seems like the error came from the difference between the root name of the project and the name used for the ios binaries. By naming the root project CommonTavla
I don’t get the error anymoreDarshan Nair
02/14/2024, 4:01 PM./gradlew assembleXCFramework
Name of XCFramework 'kmp-shared' differs from inner frameworks name 'shared'! Framework renaming is not supported yet
error: the path does not point to a valid framework: /Users/danair/Desktop/KotlinMultiPlatform/my-kotlin/libraries/kmp-libraries/kmp-shared/build/kmp_sharedXCFrameworkTemp/fatframework/debug/iosSimulator/kmp_shared.framework
Darshan Nair
02/14/2024, 4:01 PMDarshan Nair
02/14/2024, 4:04 PMkmp-shared
in existing android kotlin project and am trying to generate XCFramework from here.
Below is my build.gradle:
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
}
kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
val xcf = XCFramework("kmp-shared")
val iosTargets = listOf(iosX64(), iosArm64(), iosSimulatorArm64())
iosTargets.forEach {
it.binaries.framework {
baseName = "shared"
xcf.add(this)
}
}
sourceSets {
val commonMain by getting {
dependencies {
...
}
}
}
}
android {
namespace = "com.wbd.beam.kmp"
compileSdk = 34
defaultConfig {
minSdk = 21
}
}
jean
02/15/2024, 7:31 AMDarshan Nair
02/16/2024, 9:52 AMassembleSharedXCFramework
assemble command. Seems the default assemble command assembleXCFramework
was using the module name which is different then my XC baseName.