My Common KMM Folder does not have an xcode-framew...
# multiplatform
m
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
Are you using cocoapods or direct xcframework?
m
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
I see, makes sense. Did you run the
assembleXCFramework
gradle task?
m
No I did not
p
The name is not quite exact as I typed it but is similar.
m
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
Trying that.
I did not have
xcf.add(this)
Should I have JAVA_HOME env var in Xcode
p
Not sure but Is possible that something needs java for something
m
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
Are you in the Android Studio project root folder
m
yes
p
You need to and you don't see the gradlew script?
m
I see it
Copy code
.\gradlew tasks
zsh: command not found: .gradlew
p
You mean
./
m
ooh got it.
Let me run and check
Same error
p
What is the output of
pwd
command?
m
gives the path of my project
/Users/xxxx/Documents/Codes/myproject
p
Sorry I mean
ls
m
androidApp build.gradle.kts gradle.properties gradlew.bat local.properties settings.gradle.kts README.md build gradle gradlew iosApp shared
p
Yeah you are in the right directory then I have no idea what is going on.
m
This only happens when I try to integrate with existing app
If I build a new app it works
p
Humm, seems to me that, perhaps that gradlew file got corrupted or something
m
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
Copy and paste from another project that uses the same gradle version and see
m
I updated my kotlin version
p
Humm your gradle sounds outdated
Try updating gradle to 7.5.1 for instance
m
Same issue
k
show your
kdoctor -v
output and gradle build script
m
Looks like cocoapods is the recommended approach.
218 Views