Hello, does anyone have a trick to import an iOS d...
# amper
t
Hello, does anyone have a trick to import an iOS dependency on standalone? Cocoapods is not supported yet and was wondering if you had an example of how to do it manually for now.
f
Hi! You can add iOS platform dependencies via the Xcode project in a normal Xcode-way, so they are visible in Swift/Objective C, along with
KotlinModules
framework built from Kotlin. Depending on cocoapods or other iOS specific dependencies in Kotlin is not supported. Does this help?
t
I want to write a wrapper around a library that is available on Android and iOS. In a regular KMP project with Gradle, I would have the following structure:
Copy code
// commonMain
expect object TheLibrary {
  fun theMethod()
}

// iosMain
import cocoapods.MyLibrary

actual object TheLibrary {
  actual fun theMethod() = Mylibrary.theMethod()
}

// androidMain
import com.company.MyLibrary

actual object TheLibrary {
  actual fun theMethod() = Mylibrary.theMethod()
}
I am looking to do something similar using Amper. I am not sure this suggestion covers that use case.
f
does Amper can use cinterop KMP configuration ?
I’m wondering if I can create a plugin of my plugin’s spmForKMP for amper.
f
I am looking to do something similar using Amper. I am not sure this suggestion covers that use case.
Ah, I see. No, currently Amper doesn't support for Kotlin code to depend on cocoapods / use cinterop. We may add support for these features in some form in the future.
f
Thanks, well, I have my response. I will wait when it’s ready 😄
t
Thank you people ☺️