Hi all, I have gone through the official KMP sampl...
# multiplatform
a
Hi all, I have gone through the official KMP samples and some other ones I have found. I have noticed two types of configuration for the iOS in order to include the shared folder: • https://github.com/JetBrains/compose-multiplatform/tree/master/examples/cocoapods-ios-example
cocoapods {
version = "1.0.0"
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
isStatic = true
}
}
https://github.com/JetBrains/compose-multiplatform/blob/master/examples/todoapp-lite/shared/build.gradle.kts
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "shared"
isStatic = true
}
}
Is there a “preferred” approach or does it depends on project configuration ? Any feedbacks or experiences? The second one is what I see when I generate the project with the kmp wizard, but I have seen a lot of projects using the pod approach for the shared module.
p
One uses cocoapods the other regular framework and there is another one using Xcframework.
Depending on what you like more when integrating with Xcode. Basically if you prefer SPM or cocoapods or manually integrating the binary, in this case the .framework file.
a
Ok thank you. I will probably keep the framework for now since I am still evaluating the structure of the project, then I will dive a little bit more into the options when everything else is more clear, thanks
p
Make sense
👍 1