https://kotlinlang.org logo
#ios
Title
# ios
g

gumil

03/20/2019, 10:09 AM
Anyone know the differences between the presets? iosX64 vs arm64 etc?
and which ios preset is the safest to target?
g

gildor

03/20/2019, 10:10 AM
iosX64 is for simulator, iosArm64 is for real device
g

gumil

03/20/2019, 10:15 AM
thanks for the fast reply!
are you able to do unit test in a arm64 preset?
g

gildor

03/20/2019, 10:16 AM
I believe you cannot run unit tests for iOS
only instrumentation, run them on device or simulator
at least it how I understand unit tests
g

gumil

03/20/2019, 10:19 AM
well yeah. I was just wondering if the iosX64 is strictly for simulators and you should use arm64 when releasing the app?
👌 1
s

svyatoslav.scherbina

03/20/2019, 10:22 AM
Take a look at any Kotlin iOS sample/template/tutorial. For example: https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html
g

gumil

03/20/2019, 10:23 AM
Also, how would we go about releasing artifacts for a library? Should we create artifacts for both arm64 and x64?
s

svyatoslav.scherbina

03/20/2019, 10:27 AM
As a library for what? Swift?
g

gumil

03/20/2019, 10:29 AM
to be used in a multiplatform project
s

svyatoslav.scherbina

03/20/2019, 10:34 AM
Then your are supposed to have both targets enabled in your project.
g

gumil

03/20/2019, 10:35 AM
does it already bundle the ios targets in the generated KLIB artifact?
s

svyatoslav.scherbina

03/20/2019, 10:48 AM
Gradle plugin can publish a multiplatform library containing multiple klibs/jars/whatever
g

gumil

03/20/2019, 10:50 AM
yes but it creates separate artifacts for arm64 and x64
s

svyatoslav.scherbina

03/20/2019, 10:57 AM
Gradle
kotlin-multiplatform
plugin publishes all these artifacts within the single library.
3 Views