Hey, all. When I created my project using the Kotl...
# multiplatform
d
Hey, all. When I created my project using the Kotlin Multiplaform Wizard a few weeks ago, it generated one that includes the following:
Copy code
listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach { iosTarget ->
        iosTarget.binaries.framework {
            baseName = "ComposeApp"
            isStatic = true
        }
    }
For the project, I'm only interested in targeting Android tablets and iPads. So is there any one of these that I can remove? I only asked because, in Android Studio, there are several ios*Main targets (iosArm64Main, iosMain, iosSimulatorArm6Main, iosX64Main) in addition to the ioApp target at the root level. Is it safe to remove this block, and the directories for all but iosMain and iosApp?
e
no. iosX64 is for the simulator on intel macs, iosSimulatorArm64 is for the simulator on apple silicon, and iosArm64 is for the physical devices
thank you color 1
well, you can remove any specific leaf source directories if everything you need is in their common parents
d
So the directories can be delete and I can leave the gradle config alone?
I’ve no plans for writing a Mac version: that would be covered by a desktop app if we release one.
e
none of those are for a desktop app
that would be macosX64 and macosArm64
even if you don't plan on using the simulator to test your app before deploying to a device, you need the simulator targets in order to run unit tests
d
I know they’re not for desktop. I was saying I don’t plan on doing a Mac release. By desktop I was referring to the Java desktop target, which isn’t in our plans currently either.
Our target platforms are solely android tables and iPads.
Just revisiting this thread. I'm still not clear on which directory or directories and targets I can remove from the KMP project. The project will only target Android tablets, iPads, and (possibly) Java desktops. Of the three targets in the composeApp/build.gradle.kts:
_listOf_(
iosX64(),
iosArm64(),
iosSimulatorArm64()
)._forEach_ *{* iosTarget *->*
iosTarget.binaries.framework *{*
baseName = "ComposeApp"
isStatic = true
}
}
Which one(s) can we remove? And what directories can go?