Hi everyone! I've tried to debug my kmm project co...
# multiplatform
r
Hi everyone! I've tried to debug my kmm project compilation time and i figured out that cinterop from iOS-Pod takes a lots of time. The optimization I i'm trying to do: I want to compile it once and just add to my project as klib Steps 1. First of all I make an xcframework from ios Pod (connect it to temp project, compile it and take the compiled pod) 2. Second, I tried to use cinterop to build klib. I've create a .def file (attached below) than use scrip
$konanHome/bin/cinterop -def $defFile -o $outputDir/sdWebImageInterop
-> I got klib file (35kb size, maybe it's too small) 3. Add this klib to my build.gradle.kts, in iosMain dependencies section i add
implementation(files("sdWebImageInterop.klib"))
Then I do sync and don't see any SDWebImage API available in iosMain section. Also iOS project won't compile at all, it says:
KLIB resolver: Could not find /path/to/kLib/sdWebImageInterop.klib
also it shows warning
KLIB resolver: Skipping /path/to/klib/sdWebImageInterop.klib The target doesn't match. Expected 'ios_simulator_arm64', found 'macos_arm64'
Questions: 1. Is this even possible, to do something like this? To build a klib from iOS-Pod and add it to kmm project 2. I supposed my .def file is't working properly. This klib should contains all of the architectures (arm64, ios_simulator_arm64, x86_64) but it contains only macos_arm64. How it should looks like? 3. How to set many headers in .def file, for how (just for test) I set only one. The only way I found yet is to create kind of an umbrella.h and import all other headers inside P.S. used SDWebImage just for example :)