I am writing a cross platform game sample with the...
# kotlin-native
a
I am writing a cross platform game sample with the goal of moving all our Android game code to it. I'm running into problems with where to put image resources that are loaded from the actual implementation of expected classes for iOS and Android. Working on iOS first, I can load the image by passing NSData contentsAtPath to the UIImage constructor. However, I am missing how to get the path for the image and where to place the png file. Is there a load resource from classloader for Kotlin-Native iOS? Any pointers are much appreciated.
👍 1
Never mind. My bad. Just have to make sure the file is copied during build phases: copy bundle resources in xcodeproj settings. Then, just using UIImage.imageNamed(filename) works.