You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Expected function 'getPlatform' has no actual declaration in module ComposeMuliplatformApp:shared for Native
error: Compilation finished with errors
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':shared:compileKotlinIosSimulatorArm64'.
Compilation finished with errors
For configuration I have added below things inside shared build.gradle:
error: Expected function 'getPlatform' has no actual declaration in module ComposeMuliplatformApp:shared for Native
error: Compilation finished with errors
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':shared:compileKotlinIosSimulatorArm64'.
Compilation finished with errors
For configuration I have added below things inside shared build.gradle:
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "ComposeApp"
isStatic = true
export("dev.icerock.moko:resources:0.23.0")
export("dev.icerock.moko:graphics:0.9.0") // toUIColor here
}
}
sourceSets {
getByName("androidMain") {
dependsOn(commonMain.get())
kotlin.srcDir("build/generated/moko/androidMain/src")
}
getByName("iosX64Main") {
dependsOn(commonMain.get())
kotlin.srcDir("build/generated/moko/iosX64Main/src")
}
getByName("iosArm64Main") {
dependsOn(commonMain.get())
kotlin.srcDir("build/generated/moko/iosArm64Main/src")
}
getByName("iosSimulatorArm64Main") {
dependsOn(commonMain.get())
kotlin.srcDir("build/generated/moko/iosSimulatorArm64Main/src")
}
}
And with iosApp.xcworkspace added following script
"$SRCROOT/../gradlew" -p "$SRCROOT/../" :shared:copyFrameworkResourcesToApp
-Pmoko.resources.PLATFORM_NAME="$PLATFORM_NAME"
-Pmoko.resources.CONFIGURATION="$CONFIGURATION"
-Pmoko.resources.ARCHS="$ARCHS"
-Pmoko.resources.BUILT_PRODUCTS_DIR="$BUILT_PRODUCTS_DIR"
-Pmoko.resources.CONTENTS_FOLDER_PATH="$CONTENTS_FOLDER_PATH"
The text was updated successfully, but these errors were encountered: