I try to use kotlin library in iOS application. I’...
# kotlin-native
a
I try to use kotlin library in iOS application. I’ve made library in path
build/bin/iosArm64/debugFramework/XpointSdkIos.framework
and copy this into
build/xcode-ios-frameworks/XpointSdkIos.framework
(from example https://github.com/Kotlin/kmm-sample/) Next I’ve added this library to Xcode project. When I try to build iOS application for iPhone Xr and I have the error
Ignoring file .../build/xcode-ios-frameworks/XpointSdkIos.framework/XpointSdkIos, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64
How can I fix it? How can I build library for
iOS-arm64
?
t
the relevant part is here: https://github.com/Kotlin/kmm-sample/blob/master/shared/build.gradle.kts#L64 normally you would build the framework as an xcode build step where these env variables would be set
so you can set them manually, but having the framework build from xcode (which AFAIK the KMM template also does) or creating a fat framework is a better alternative
a
Yes, I’ve had a copy of this project.
so you can set them manually, but having the framework build from xcode
Framework for iOS must be as small as possible.
t
whether you build from xcode or yourself has no effect on size
a
Hm… Ok, thanks!
The root cause of problem - the parameter was loosed 😞