I'm interested in the Compose shared resources sup...
# compose-ios
d
I'm interested in the Compose shared resources support (strings, colors, etc.) Can I use this in a KMP library that would be used by multiple iOS and Android apps WITHOUT having to use anything else Compose related? Our iOS UIs are native and we don't have any interest in using Compose Multiplatform for cross platform UI.
v
Hi David,
compose-multiplatform
resources still need to be interpreted by
composeFunctions
. So for something like a picture for example, even if the
iOS
module gets its hands on the
DrawableResource
object, it can't do much with it. Things are a bit different for strings & colors though as you could think of them being passed down as `POJO`s. With that being said, in order for those resources to react to changes (localizable strings for example) you would still have to invoke a mini
compose
scope on
iOS
and save the result you got from compose. At that point better to just forego
compose-multiplatform-resources
and if you really want to share colors & strings, just create your own instances of classes of strings & colors. And observe configuration changes on the native apps and ask for a new version of the resources every time they change.
👍🏻 1
👍 2