Hey folks, is there a way to just publish framewor...
# touchlab-tools
s
Hey folks, is there a way to just publish framework via SPM ? while using https://touchlab.github.io/KMMBridge/intro ? I managed to publish it via SPM, but it seems to have added all of the other modules that for
android/jvm etc
? i just wanted shared module Framework from kotlin native so i can use its classes in my iOS app?
it looks like this now
r
Are you asking about all the different folders inside of
src
there? That's just source code and not indicative of what's being published in your framework
(that's also coming from the new project template and not from our plugin)
s
This is from the sample ios app, where i added my SPM dependency and it pulled all the source code. Also, i cant find any Framework file in it, that i can import and use. Sorry if I am missing anything very basic or understanding it correctly i just followed all the steps mentioned in https://touchlab.github.io/KMMBridge/intro/. What i expected, is that what will happen, is iOS part (Framework) of the shared module will get published in the SPM. And when i pull it from my sample app, ill only get that instead of all source code and no Framework file.
r
It might help to read through the SPM configuration doc. The intro doc covers the Kotlin side but doesn't go into detail on consuming it. https://touchlab.github.io/KMMBridge/spm/IOS_SPM
s
yup, went through it and thats how i created the SPM package. My repo is public https://github.com/Shahroz16/pgkmm One very weird thing that you can see in releases is, published version doesnt have any framework? only initial release did. not sure why is that.
r
The frameworks are all published to a single release. You can see them here https://github.com/Shahroz16/pgkmm/releases/tag/kmm-artifacts-1.0
It's a little confusing, but essentially, the release tags point to a particular package.swift file which is versioned. That package file then points to a binary, and we store all those binaries in a single release. This lets us keep everything in a single repo but avoids timing complications where we otherwise wouldn't know where to link to when we need to commit the package file change
s
That makes sense! Thank you for explaining that.