zalewski.se
06/02/2020, 4:05 PMval iOSTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
::iosArm64
else
::iosX64
iOSTarget("ios") {
binaries {
framework(uniqueName)
}
}
Then everything works in iosMain
, I can see whole syntax highlighting correctly.
Although if I set it like here:
ios {
binaries {
framework(uniqueName)
}
}
Everything related to iOS is red, I can’t see any import (although it compiles correctly) and syntax highlighting is broken.russhwolf
06/02/2020, 4:09 PMios {}
sets up an intermediate source-set and the IDE currently has trouble detecting what platform APIs are available there. Expect that to improve over time as this family of issues is worked: https://youtrack.jetbrains.com/issue/KT-27801zalewski.se
06/02/2020, 4:22 PMKris Wong
06/02/2020, 4:35 PMiosMain
, then you need a target named ios
iosX64
and iosArm64
russhwolf
06/02/2020, 4:37 PMios {}
builder creates an ios
source in addition to iosX64
and iosArm64
, but the IDE interprets it as commonzalewski.se
06/02/2020, 4:44 PMrusshwolf
06/02/2020, 4:45 PMsrc/iosMain
directory, for example, and apply them to both iosArm64
and iosX64
targetsKris Wong
06/02/2020, 5:14 PMios
zalewski.se
06/03/2020, 5:25 AM