https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sam

06/21/2022, 10:35 AM
Anyone used this library and have any thoughts? https://github.com/icerockdev/moko-resources
🔥 1
m

Mustafa Ozhan

06/21/2022, 10:37 AM
Yes use in production with no issues and i don’t think you can find better alternative 🙂
🔥 1
s

Sam

06/21/2022, 10:38 AM
Brilliant, cheers! Just looking at it now. Did you have any issues with the case where you want to define a different strings for the different platforms? e..g. on Android saying "Open Playstore" vs iOS "Open Appstore" Or did you just deal with those as edgecases?
m

Mustafa Ozhan

06/21/2022, 10:42 AM
Well I didn’t try that, i used a generic name like open
market
😅 but you can actually try putting different
resources
into
iosMain
and
androidMain
, if it will not work you can create an issue in GitHub they keep improving the library 🙂
s

Sam

06/21/2022, 10:43 AM
Gotcha, thanks for your help!
m

Mustafa Ozhan

06/21/2022, 10:43 AM
no worries 🙂
w

wbertan

06/21/2022, 11:30 AM
plus1 here saying we use the library for text and images. It is working without problems. We can use plurals, and formatted strings. For cases like yours, not sure we had it 🤔 (but TBH some places we hardcoded some iOS strings due the time and other factors...) BUT if I would have to come up with something where I don't want to spend a lot of time, and if it is just a few of these cases, I would go in an easier route, maybe send something like
androidLabel
and
iosLabel
and on this case leave for each View on each platform to choose which label to display 🙃 But of course, all depends on your project and team decisions.
🔥 1
s

Sam

06/21/2022, 11:32 AM
It was more something I was wondering to be honest! I doubt it'll come up very much, not enough to actually come up with a specific solution for it. Thanks for that though it's reassuring knowing others have had a good experience on it!
v

Vojtěch Pešek

06/21/2022, 11:40 AM
Thanks for sharing this and feedback from others, we might introduce it in our project
🔥 1