Figured out how to run tests for iOS: ``` xcrun si...
# multiplatform
b
Figured out how to run tests for iOS:
Copy code
xcrun simctl spawn '<sim name like iPad Air 2>' <path to test.kexe>
agree this should just be handled automatically
i imagine they havent because part of that task references a target you define
i
r
Examples exist but it isn't provided by default (either in the plugin or in the new project templates)
👍 1
b
@maxim that build.gradle shows them creating a custom task to do it
IMO, it should be built into the plugin
i
@basher got it now. Thanks
b
Np!
i imagine they havent because part of that task references a target you define
@alec i'm referencing a task generated from the kotlin-multiplatform plugin. Seems like
fromPreset
(or
targetFromPreset
in 1.3.20) could just generate this task too
a
yup they could at the very least create a test task for each target
iosDeviceTest
i could add it to our cocoapods plugin 😉
r
But something still needs to tell it which simulator to use. Just having a target defined doesn't specify that
a
i still need to figure out the best way how to get these tests to run as part of a CI build w/ cocoapods
b
Heh yeah 🙂
a
yea the task in their example defaults to an iPhone 8 simulator
b
@russhwolf agree, but it could specify a default and then allow it to be altered as a variable in the
fromPreset
block
If it wanted to be extra fancy (and verbose), it could run
xcrun simctl list
and output one task per sim. It'll generate a lot of tasks, but the could be configurable as well?
r
yeah I agree. I just mention it to highlight that there are some API decisions to make before integrating it into the plugin, which maybe is why they haven't yet
b
Good point!
@alec the more I think about it, it prob makes sense to have a generic iOS plugin
The maintenance burden of this feels beyond the scope of K/N