I'm trying to better understand the interplay betw...
# ios
j
I'm trying to better understand the interplay between KMM libraries, XCFrameworks, and App Extensions. My business case is as follows: I'm trying to realize a library that allows KMM apps to offer certain system services (password autofill) in a system-agnostic manner. To implement the system-specific parts (without using a library), an app needs to register a suitable service via the manifest (Android) or offer a suitable app extension (iOS). I am now trying to move these system-specific parts to a KMM library. Doing so on Android is fairly trivial, since my library includes its own AndoidManifest.xml, which is automatically merged into the embedding app's. This is where my question comes in: how can I do this on iOS? Can I specify an app extension in a KMM library, which will then become an extension of any app including my library? If not, how can I make the embedding process as painless as possible for any app depending on my library? I feel like my understanding of the interplay between KMM sources, Frameworks, App Extensions, and actual apps, is what's lacking here.
f
I guess, it’s more a iOS skill issue than a kmp issue. Do you know at least how to do it in pure swift?
j
I am not aware of any way to have a library (a framework?) include/define an app extension, no; as I understand it, app extensions can only be defined by apps, not by libraries. (Is this understanding correct?)
f
Yes, like the (not working anymore) iOS google keyboard, that’s a google example :)
j
i'm not sure i follow your point
f
Yeah, maybe not the good example. Anyway, what you can do with Xcode and swift you can also you do it in kmp (but not always faster, it’s badly documented)