Hello, I am working on the KMM library for Androi...
# multiplatform
j
Hello, I am working on the KMM library for Android and iOS. Inside I add the framework - FaceSDK as dependencies without using cocopods. The FaceSDK framework is only used in special cases. Is it possible to add it to the KMM library in such a way that in the output iOS mobile application I do not have to add the FaceSDK framework as a dependency until I am sure that I will use it in my KMM xcframework? Currently, when running the test application on iOS, I get an error that my KMM library requires adding FaceSDK as a dependency even though I do not use code that requires this package. photo1 - KMM configuration of adding FaceSDK as dependency without using cocoapods photo2 - error from test app
y
Why does it matter?
j
This matters because the FaceSDK weighs 60mb and I don't want to add it to my final application to increase its size unnecessarily when the FaceSDK is not being used. Also I do not want to make 2 versions of my KMM library, to handle this case. On android it is working as expected, FaceSDK is only needed when code from its is used. Is it possible to change Ios configuration to work same as android?
y
Surely that's the nature of dependencies - they are used to compile the code to deal with all possible paths through the code. You can't recompile at runtime!
j
I think we dont understand each other
c
It not easily possible. What you see on Android is, that R8/Progurad is minifying the code by deleteing not executed code paths. iOS works differently.
👍 1