Adding iOS simulator tests to KMM Project

Hi!, I’m having some problems when trying to run some integration tests in iOS Devices:

I have code that is different when running on the simulator or the device, so I have these folders

  • iosMain (95% of my code)
  • iosTest
  • iosArm64Main (that 5% of the code which is specific for the device, uses Metal)
  • iosX64Main (same 5% of the code which is in OpenGL because sim does not support Metal)

In order to make this work, someone suggested to add this to build gradle file

    val isIdeaSyncing = System.getProperty("idea.sync.active") != null
    if (isIdeaSyncing) {
        iosX64("ios")
    } else {
        ios()
        iosX64()
        iosArm64()
    }

Well, with that, when I try to run a test in iosTest folder I got this error

FAILURE: Build failed with an exception.
* What went wrong:
Task 'cleanIosTest' not found in project ':sdk'.

Probably because on how I define the targets, but If remove above’s snippet with the iOS targets, then the code which is exclusive for simulator or device is not built

Any clues?? Thank you!