Xcode won't compile in kmm project

19 Views Asked by At

/bin/sh -c /Users/bimpos/Library/Developer/Xcode/DerivedData/iosApp-fmohpbncpclqkmfhfeoxygquosgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/shared.build/Script-BEA8885189D408D600647BDC228A6A20.sh

            REPO_ROOT="$PODS_TARGET_SRCROOT"
            "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework                     -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME                     -Pkotlin.native.cocoapods.archs="$ARCHS"                     -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"

env: sh\r: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code

1

There are 1 best solutions below

0
Dan Gerchcovich On

Looks like you're missing a x64 target on your shared gradle file. If you go into the Multiplatform Module's gradle file (by default it's called shared). It should look something like this:

kotlin {
     x64()   // for rosetta devices
     arm64()  //arm64 devices
     arm64Simulator()
   
     commonMain{   } // your shared module (default name is commonMain)

     val x64 by getting 
     val arm64 by getting
     val arm64Simulator by getting
     iOSMain(){   // any source sets you write into iOS Main gets added into target folders
        dependsOn(commonMain)
        x64.dependsOn(this)
        arm64.dependsOn(this)
        arm64Simulator.dependsOn(this)
     }

}