mirzemehdi / KMPAuth

Kotlin Multiplatform Authentication Library targetting android and iOS
https://mirzemehdi.com/KMPAuth/
Apache License 2.0
231 stars 19 forks source link

Uncaught Kotlin exception: org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: #2

Closed mirzemehdi closed 1 week ago

mirzemehdi commented 10 months ago

When implementing kmpauth-uihelper module, Android builds and works normally. But in iOS it crashes with runtime error. Uncaught Kotlin exception: org.jetbrains.compose.resources.MissingResourceException: Missing resource with path:

mirzemehdi commented 10 months ago

For some reason compose-resources aren't visible in iOS side.

Solution:

First Step: in your shared module in iosMain sourceSet create resources directory (if not exists), and download Resources, unzip and copy as below image. Resources

image

Second step: in build.gradle file set resources directory as below

iosMain {
  resources.srcDirs("src/commonMain/resources","src/iosMain/resources")
  dependencies {
    //Your dependencies
  }
}
mirzemehdi commented 1 week ago

with new compose version this should be fixed, if it happens again this issue needs to be reopened