when I link my iOS app to a KMP framework via `-fr...
# multiplatform
t
when I link my iOS app to a KMP framework via
-framework
via
Other linker flags
, is that static or dynamic? (It's proving remarkably hard to google)
l
It depends on whether to framework itself is static or dynamic. You use the
-framework
flag either way. You can check the gradle for a isStatic variable.
t
ah, thanks. I haven't set
isStatic
and I'm including it in the iOS build with the
embedAndSignAppleFrameworkForXcode
task
l
I want to say isStatic defaults to false, so expect a dynamic framework. This means that you'll need to ship a copy of the framework as part of the app bundle.
t
yeah, it seems like it's dynamic if I had to guess. In the KMP framework Gradle file, I'm linking
UIKit
the same way (with
-framework
) and I'm sure that's being handled as dynamic
and I vaguely remember from my C days, static linking generally means naming the static library file instead of referencing it as a flag argument (but it's been a while and this is the Obj-C (?) linker so my experience isn't necessarily useful)
based on my success with Moko Resources just now, my framework must be dynamic. Thanks for your help!
208 Views