sushma nayak
04/07/2021, 10:24 PMld: warning: ignoring file ****/common/build/cocoapods/framework/common.framework/common, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CommonSafeStore", referenced from:
objc-class-ref in AppCoordinator.o
ld: symbol(s) not found for architecture arm64
SafeStore
is an expect/actual class
. After adding this the issue arose.
Is there anything additional that is needed for expect/actual declared classes to run on Xcode?itnoles
04/08/2021, 1:52 AMsushma nayak
04/08/2021, 9:10 AMbuilding for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
I'm on M1 mac.Mustafa Ozhan
04/08/2021, 2:54 PMsushma nayak
04/08/2021, 5:42 PMimport org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
id("com.android.library")
}
version = "1.0"
kotlin {
android()
val iosTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
::iosArm64
else
::iosX64
iosTarget("ios") {}
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
frameworkName = "shared"
podfile = project.file("../iosApp/Podfile")
}
sourceSets {
val commonMain by getting
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val androidMain by getting
val androidTest by getting {
dependencies {
implementation(kotlin("test-junit"))
implementation("junit:junit:4.13.2")
}
}
val iosMain by getting
val iosTest by getting
}
}
android {
compileSdkVersion(30)
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdkVersion(21)
targetSdkVersion(30)
}
}
Yashar
04/11/2021, 4:55 PMarm64
? Doing that solved a lot of headaches for me when working on M1 machine.