In KMP Application, if i put some json file in com...
# multiplatform
v
In KMP Application, if i put some json file in commonMain/resources, i should be able to read it from NSBundle.main? Or there are extra steps involved? Do i need to set something in xcode project? Because right now, the file is not found in the bundle. Also do i need to manually add "commonMain/resources" to the sourceSet resources? Or it's taken care for me automatically?
j
There's not currently support for embedding resources in a Kotlin Native framework. There's an issue you can follow.
v
Strangely it works for me anyhow :) It just puts it under compose-resources subfolder on iOS
j
If you're using Compose Multiplatform, then yes, the framework handles copying resources for you.
v
Ah, i do not embed resources in the library but in the consuming app
👍 1