Does anyone know what the following error means? I...
# kotlin-native
t
Does anyone know what the following error means? I tried compiling my Kotlin code as a watchOS framework but I keep getting the following error when running from Xcode.
After some experimenting it looks like the following code is causing the issue for watchOS:
Copy code
import platform.UIKit.UIImage
import platform.UIKit.UIImageJPEGRepresentation

fun errorExample() {
    val image = UIImage.imageNamed("")!!
    UIImageJPEGRepresentation(image, 0.70f)
}
a
This should be fixed in 1.3.70 ,see (https://github.com/JetBrains/kotlin-native/pull/3697).
t
@Artyom Degtyarev [JB] That’s great! Another thing I noticed is that when I build for simulator (watchosX86) instead of a real device I get the following error:
Copy code
fatal error: error in backend: Section too large, can't encode r_address (0x1000a99) into 24 bits of scattered relocation entry.
Is this a known bug, too, or am I doing something wrong?
@Artyom Degtyarev [JB] do you know what the error above means? I am getting this with 1.3.70. Only happens for simulator, no issues at all for real Apple watch.