https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Meherdatta Chepuri

03/09/2023, 11:37 PM
My Common KMM Folder does not have an xcode-frameworks folder. Iam not able to attach this to my iOS project. Any insights on why this might be happening?
p

Pablichjenkov

03/10/2023, 1:14 AM
Are you using cocoapods or direct xcframework?
m

Meherdatta Chepuri

03/10/2023, 1:14 AM
I want to use xcframework.
But I want to add it to my existing iOS project
I get
Copy code
Script-8E45341829BAB90900C8F1D1.sh: line 3: ./gradlew: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
p

Pablichjenkov

03/10/2023, 1:16 AM
I see, makes sense. Did you run the
assembleXCFramework
gradle task?
m

Meherdatta Chepuri

03/10/2023, 1:16 AM
No I did not
p

Pablichjenkov

03/10/2023, 1:17 AM
The name is not quite exact as I typed it but is similar.
m

Meherdatta Chepuri

03/10/2023, 1:18 AM
Are you talking about this
assembleXCFramework
is the task name I was referring to, I had it right, in the above link, almost at the end, try that
m

Meherdatta Chepuri

03/10/2023, 1:22 AM
Trying that.
I did not have
xcf.add(this)
Should I have JAVA_HOME env var in Xcode
p

Pablichjenkov

03/10/2023, 1:24 AM
Not sure but Is possible that something needs java for something
m

Meherdatta Chepuri

03/10/2023, 1:25 AM
Still fails with
Copy code
./gradlew: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
Should I run a gradle command before ?
p

Pablichjenkov

03/10/2023, 1:43 AM
Are you in the Android Studio project root folder
m

Meherdatta Chepuri

03/10/2023, 1:43 AM
yes
p

Pablichjenkov

03/10/2023, 1:44 AM
You need to and you don't see the gradlew script?
m

Meherdatta Chepuri

03/10/2023, 1:44 AM
I see it
Copy code
.\gradlew tasks
zsh: command not found: .gradlew
p

Pablichjenkov

03/10/2023, 1:45 AM
You mean
./
m

Meherdatta Chepuri

03/10/2023, 1:47 AM
ooh got it.
Let me run and check
Same error
p

Pablichjenkov

03/10/2023, 2:02 AM
What is the output of
pwd
command?
m

Meherdatta Chepuri

03/10/2023, 2:03 AM
gives the path of my project
/Users/xxxx/Documents/Codes/myproject
p

Pablichjenkov

03/10/2023, 2:03 AM
Sorry I mean
ls
m

Meherdatta Chepuri

03/10/2023, 2:04 AM
androidApp build.gradle.kts gradle.properties gradlew.bat local.properties settings.gradle.kts README.md build gradle gradlew iosApp shared
p

Pablichjenkov

03/10/2023, 2:04 AM
Yeah you are in the right directory then I have no idea what is going on.
m

Meherdatta Chepuri

03/10/2023, 2:05 AM
This only happens when I try to integrate with existing app
If I build a new app it works
p

Pablichjenkov

03/10/2023, 2:06 AM
Humm, seems to me that, perhaps that gradlew file got corrupted or something
m

Meherdatta Chepuri

03/10/2023, 2:06 AM
Can we generate a new one?
One thing to note is my kotlin version in gradlew is 1.5.3 and kotlin in my project is 1.8.0
p

Pablichjenkov

03/10/2023, 2:13 AM
Copy and paste from another project that uses the same gradle version and see
m

Meherdatta Chepuri

03/10/2023, 2:13 AM
I updated my kotlin version
p

Pablichjenkov

03/10/2023, 2:13 AM
Humm your gradle sounds outdated
Try updating gradle to 7.5.1 for instance
m

Meherdatta Chepuri

03/10/2023, 2:49 AM
Same issue
k

Konstantin Tskhovrebov

03/10/2023, 11:47 AM
show your
kdoctor -v
output and gradle build script
m

Meherdatta Chepuri

03/10/2023, 5:33 PM
Looks like cocoapods is the recommended approach.
148 Views