Hello everyone! I wonder how you guys overcome the...
# compose-ios
t
Hello everyone! I wonder how you guys overcome the limitation with resources in multi module projects? I'm sitting on a version 1.6.1 and what I've done is I have all the resources on
composeApp
module (the main one) and other module access the resources simply by string. It worked for some time, but on iOS the behaviour is not deterministic. I mean sometimes it works, sometimes doesn't. For whatever reason, the resources are not copied to the app bundle sometimes. Any workarounds there?
m
Hey! While I also have all resources in the composeApp module and the provide them via Koin (i access them in other modules sth like
resourceProvider.getDrawable(AppDrawable.IconBack)
, and in the composeApp module i basically provide the implementation for each enum. Till now iOS finds my resources basically fine. Did you try a fresh project if it happens there too? And which format you see the issue with? (Png, svg,…?)
Benefit with enums is that you can’t forget to provide the resources, since it doesn’t compile 😄
t
Those are fonts and drawables. For strings we have custom implementation which is not based on xml 🙂
Which version of compose multiplatform you are on?
m
Currently on
1.6.10-dev1599
(i know it’s not newest)
❤️ 1