Is it possible to ship a KMP library to iOS teams, which opens a viewController ( in my case it holds a webview) written inside the kmp library ?
Anmol Verma
04/16/2025, 6:06 AM
I was looking at @François's spm4kmp, but not entirely sure how that would work here.
I can have the swiftui view which is a SPM which holds the webview and then maybe from somewhere in my iosMain (kmp) I can open a viewController which holds this swituiview ?
the caller of this library from iOS app just needs to call
MyKMPLibrary.openWebView()
-> this opens up the viewController which has the swiftui view holding the webview
f
François
04/16/2025, 6:20 AM
You can do what you want inside the plugin bridge, but you need to respond to the exporting rule,
I advise working with a local package before integrating it with the plugin.
You can take an example from this one :
https://frankois944.github.io/spm4Kmp/usages/distribution/#bridge
a
Anmol Verma
04/16/2025, 6:27 AM
Thanks for the amazing work also i will have a look at this sample 🙇