Hello guys, I’m trying to add `moko-resources` to...
# multiplatform
r
Hello guys, I’m trying to add
moko-resources
to my Compose multiplatform project. I’ve added the
alias(libs.plugins.moko.resources)
to the plugins section and the
dependsOn
section to the
sourceSets
section like this:
Copy code
val iosX64Main by getting
        val iosArm64Main by getting
        val iosSimulatorArm64Main by getting

        val iosMain by creating {
            dependsOn(commonMain)
            iosX64Main.dependsOn(this)
            iosArm64Main.dependsOn(this)
            iosSimulatorArm64Main.dependsOn(this)
            dependencies {
                implementation(libs.ktor.client.darwin)
            }
        }
also, I’ve added a Build Phase into the iOS project
Copy code
"$SRCROOT/../gradlew" -p "$SRCROOT/../" :composeApp: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"
but I’m getting an error:
Copy code
error: Compilation failed: Linking globals named 'OBJC_CLASS_$_VersionAppLong': symbol multiply defined!
Compilation failed: Linking globals named 'OBJC_CLASS_$_VersionAppLong': symbol multiply defined! * Source files: 
 * Compiler version: 1.9.22
 * Output kind: FRAMEWORK
error: java.lang.Error: Linking globals named 'OBJC_CLASS_$_MagineAppLong': symbol multiply defined!
	at org.jetbrains.kotlin.backend.konan.llvm.DefaultLlvmDiagnosticHandler.handle(diagnosticReport.kt:25)
java.lang.Error: Linking globals named 'OBJC_CLASS_$_VersionAppLong': symbol multiply defined!	at org.jetbrains.kotlin.backend.konan.llvm.LlvmDiagnosticCollector.flush(diagnostics.kt:36)
	at org.jetbrains.kotlin.backend.konan.llvm.Lin
Anyone has idea why?