Bao Le Duc
09/15/2025, 8:06 AMNSBundle.allBundles.filterIsInstance<NSBundle>().forEach { bundle ->
val path = bundle.pathForResource("config", "json")
if (path != null) {
return NSString.stringWithContentsOfFile(
path = path,
encoding = NSUTF8StringEncoding,
error = null
) as String? ?: throw IllegalStateException("Failed to read file")
}
}
It seems that the file wasn’t copied into iOS bundle. I’m not using https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-resources.html because I don’t use Compose Multiplatform in the app
Please helpFrançois
09/15/2025, 10:20 AMBao Le Duc
09/15/2025, 10:21 AMFrançois
09/15/2025, 10:22 AMBao Le Duc
09/15/2025, 10:23 AMThomas
09/15/2025, 5:55 PMFrançois
09/15/2025, 6:01 PMBao Le Duc
09/16/2025, 8:03 AM