Hi All, I’m exploring KMM as per <https://kotlinla...
# multiplatform
e
Hi All, I’m exploring KMM as per https://kotlinlang.org/docs/mobile/integrate-in-existing-app.html#create-a-shared-module-for-cross-platform-code When I reach this step
./gradlew packForXcode
it complains…
Copy code
* What went wrong:
Task 'packForXcode' not found in root project 'Simple Login'.
I think the different is the tutorial iOS framework is
packForXocde
But when I use the latest KMM, it only has cocoapod….
How can I run the
./gradlew packForXcode
equivalent when using the Cocoapod iOS framework?
So just put it into your shared module's
build.gradle
e
Thanks @Arkadii Ivanov. I tried copy the Kotlin version and run it. I got the error
Copy code
FAILURE: Build failed with an exception.

* Where:
Build file '/kmm-integration-sample/shared/build.gradle.kts' line: 76

* What went wrong:
KotlinTarget with name 'iosX64' not found.
Any idea how to fix that?
a
Are you on macOS?
e
Yes, I’m on M1 macOS.
a
KMP on M1 has issues currently, I might be not 100% correct, but the iPhone simulator target for M1 is not currently supported https://youtrack.jetbrains.com/issue/KT-43667
However you should be able to build and run on a real device
e
iPhone simulator is working already. I just need the script to help setup the KMM onto the iOS side. Any insight how can I get that fix?
a
I think KMP does not support iPhone simulators on M1, there is just no such a gradle task yet
☝🏼 1