max.cruz
01/07/2021, 12:10 PMBuilding for iOS Simulator, but linking in dylib built for iOS, file '/Users/.../Shared.framework/Shared' for architecture arm64
max.cruz
01/07/2021, 12:10 PMpackForXcode
task is not going to work:
val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
val targetName = "ios" + if (sdkName.startsWith("iphoneos")) "Arm64" else "X64"
With the previous lines, even the shared iOS sources set doesn’t detect the iOS platform packages. I managed to fix that with something like this:
val targetName = "iosArm64"
val framework = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
This also works for iOS devices but not for simulatorsmax.cruz
01/07/2021, 12:38 PMSam
01/07/2021, 6:05 PMmax.cruz
01/07/2021, 7:30 PMmax.cruz
01/07/2021, 7:39 PMMichal Klimczak
01/08/2021, 9:35 PMThere isn’t an arm64 simulator target available right now@Sam what do you mean by that? I too stumbled upon this issue and I'm trying to work around it. So far: • I can build for arm64 with your help but when i try to install I get some issue https://developer.apple.com/forums/thread/667393 • I was thinking about packing as xcframework but this is a longer journey, I suppose: https://github.com/ge-org/multiplatform-swiftpackage • I'm still not sure about the simulators - do you mean that all the ios simulators are x86_64 based and they won't run at all on m1 mac, or something else related specifically to KMM?
Sam
01/08/2021, 9:40 PMMichal Klimczak
01/09/2021, 6:44 PMSystem.getenv("SDK_NAME")
returns iphoneos14.3
when I build on and for my M1 macbook. So the original script works for me (generating iosArm64
framework).Michal Klimczak
01/09/2021, 6:57 PMsushma nayak
04/08/2021, 8:53 PMmax.cruz
04/08/2021, 9:43 PMmax.cruz
04/08/2021, 9:51 PMsushma nayak
04/10/2021, 9:37 AMsushma nayak
04/10/2021, 12:06 PM