moko-resources
moko-resources copied to clipboard
Calling compose stringResource works on android but doesn't work on IOS
i have encountered an issue where calling the SharedRes (MR) on CMP work as expected on android OS but when i run on IOS app crashes.
error i get on the console that i couldn't debug :
Uncaught Kotlin exception: kotlin.native.internal.FileFailedToInitializeException: There was an error during file or class initialization
at 0 BaridiApp 0x100e4d643 kfun:kotlin.Error#<init>(kotlin.String?;kotlin.Throwable?){} + 143
at 1 BaridiApp 0x100e7f637 kfun:kotlin.native.internal.FileFailedToInitializeException#<init>(kotlin.String?;kotlin.Throwable?){} + 143
at 2 BaridiApp 0x100e7e893 ThrowFileFailedToInitializeException + 275
at 3 BaridiApp 0x100fb7c03 CallInitGlobalPossiblyLock + 759
at 4 BaridiApp 0x1005eae53 kfun:com.mahmoud.talaa.SharedRes.strings#<get-$instance>#static(){}com.mahmoud.talaa.SharedRes.strings + 75
at 5 BaridiApp 0x1005ec927 kfun:ComposableSingletons$AppKt.<init>$lambda$0#internal + 431
at 6 BaridiApp 0x1005ecea7 kfun:ComposableSingletons$AppKt.$<init>$lambda$0$FUNCTION_REFERENCE$1.invoke#internal + 95
at 7 BaridiApp 0x1005ecf5b kfun:ComposableSingletons$AppKt.$<init>$lambda$0$FUNCTION_REFERENCE$1.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 159
at 8 BaridiApp 0x100f4acd7 kfun:kotlin.Function2#invoke(1:0;1:1){}1:2-trampoline + 115
at 9 BaridiApp 0x1010a12f3 kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 587
MOKO version 0.23.0
compose version "1.5.4"
kotlin = "1.9.21"
i have been trying to downgrade kotlin version and it didn't work for some reason that i couldn't debug
kotlin 1.9 issue, so should be fixed in #575
will be fixed in 0.24.0, please check in 0.24.0-alpha-6
should be fixed in 0.24.0-beta-1