`Status`: Still not solved :disappointed: Anyone k...
# compose-ios
m
`Status`: Still not solved 😞 Anyone knows how could I share Compose resources through an XCFramework spm package? We don't have a monorepo. The setup is, we have an external repo that contains the KMP library that ends up published to github packages with SPM using kmmbridge. I have seen this issue which says it is not currently supported to bundle the resources within the XCFramwork.
There is a workaround in the discussion, however I believe it would require us to merge the codebases and we don't want to do that just yet if we can avoid it (we are trying to get buy in from the iOS team to use Compose). I wonder if is there any other setup we can use without having to merge the KMP code with the iOS codebase? I guess that using Moko resources would result into the same issue but I have not tried it yet.
h
you can change the folder’s name to compose-resources and copy the bundle resources
m
As in, copy the resources manually into the iOS repo when there is a change in resources?
h
m
Unless I'm mistaken, I believe that works because the iOS app is inside the same repository of the KMP project. However, because this is early exploration of KMP/CMP for us, we don't want to merge the repos yet, which means the resources are not available.
The idea is to publish a SPM package, and the iOS app to integrate with that package remotely, so the process is as transparent as possible initially for the iOS devs until we validate the concept works.
h
yeah, we’re in the same boat, this isn’t a possibility at the moment, only if you’re in a monorepo
🥲 1
m
Thanks for the heads up though, appreciated 🙏
Just in case anyone comes back to this message, we ended up implementing Moko Resources instead and that solved it for us! Moko Resources has the capability of bundling the resources in the XCFramework. Also, it works nicely to load resources on SwiftUI which is an extra requirement we have, so win-win!
👍 1