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

Anshulupadhyay03

03/23/2024, 7:37 PM
I have updated the compose multiplatform lib to the latest to accommodate compose resource changes. On Android everything works fine however in iOS I am getting the exception below.
Copy code
org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: font/Tajawal-Medium.ttf
c

chr

03/23/2024, 8:28 PM
I ran into this the other day – all your app resources are bundled into a
compose-resources/
folder: https://github.com/christiandeange/ozone/blob/62ca3672a7817b03e9e7ad97ed741ca7ce57[…]on/src/iosMain/kotlin/sh/christian/ozone/ui/compose/type.ios.kt
a

Anshulupadhyay03

03/24/2024, 6:45 PM
@chr Thanks for the reply. But somehow I am not convinced that we should do some specific code changes for iOS. resources working perfectly fine for both Android and web
c

chr

03/25/2024, 2:18 AM
just use `expect`/`actual` functions to load resources and you should be fine
how are you using the same code to load resources in JS and Android?
a

Anshulupadhyay03

03/25/2024, 5:54 PM
@chr I have not done anything special for that. I have just upgraded the new compose resource feature and added new font file and loaded them via typography check this out : https://github.com/youranshul/KmmMovieBuff/blob/add_web_support/shared/src/commonMain/kotlin/style/Type.kt And this is the branch where I working : https://github.com/youranshul/KmmMovieBuff/tree/add_web_support
@chr For now i would anyway use your solution.
4 Views