Issue with iOS sample project for Multiplatform

Hello,

I want to try Multiplatform to have the same app on iOS and Android. I downloaded the sample project here https://github.com/Kotlin/kotlin-examples/tree/master/tutorials/mpp-iOS-Android but I can’t manage to run the iOS project (KotlinIOS.xcodeproj) on Xcode. I get the error “/KotlinIOS/…/…/SharedCode/build/xcode-frameworks: No such file or directory” and indeed this xcode-frameworks is not there.

Is there something else to do before running the project ?

Hello, @nelson.parrilla! The sample you found is quite obsolete. Consider using this one: https://github.com/kotlin-hands-on/mpp-ios-android. It has the same project structure, but more friendly instructions.
The xcode-frameworks directory has to be made in the build process of a Kotlin project. If it is not presented, maybe one should execute the build Gradle task manually.

Thank you, it works with this project after modifying in build.gradle:

  • ext.kotlin_version = ‘1.3.61’
  • classpath ‘com.android.tools.build:gradle:3.6.0’

and in Gradle/wrapper/gradle-wrapper.properties:

  • distributionUrl=https://services.gradle.org/distributions/gradle-6.2-all.zip

Because of my gradle, Kotlin and java version.

So I manually executed “gradle build” and now it is running on Xcode.

1 Like