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

abdelrahmanesam20000

10/07/2023, 2:46 AM
Hi guys ... I am facing this issue when I am adding the forEach ... How can I fix this ?
j

Jeff Lockhart

10/07/2023, 5:00 AM
Since you're using the CocoaPods plugin, you don't need to configure the framework in this way. You can just use the
podPublishXCFramework
task. See docs.
a

abdelrahmanesam20000

10/07/2023, 8:06 PM
the same problem
@Jeff Lockhart
j

Jeff Lockhart

10/07/2023, 8:40 PM
You shouldn't configure any framework in this way. The CocoaPods plugin already configures Gradle tasks for building a framework.
a

abdelrahmanesam20000

10/07/2023, 8:41 PM
more details please ?? this is what is in the link you mentioned
j

Jeff Lockhart

10/07/2023, 8:57 PM
From the link:
If you're using CocoaPods integration in your projects, you can build XCFrameworks with the Kotlin CocoaPods Gradle plugin. It includes the following tasks that build XCFrameworks with all the registered targets and generate podspec files:
podPublishReleaseXCFramework
, which generates a release XCFramework along with a podspec file.
podPublishDebugXCFramework
, which generates a debug XCFramework along with a podspec file.
podPublishXCFramework
, which generates both debug and release XCFrameworks along with a podspec file.
It's all configured in the
cocoapods { ... }
configuration block.
a

abdelrahmanesam20000

10/07/2023, 9:00 PM
what I understood is that I should use the following or use CocoaPods integration
but I mustn't use both they have the same job right ?
Copy code
listOf(
    iosX64(),
    iosArm64(),
    iosSimulatorArm64()
).forEach {
    it.binaries.framework {
        baseName = "shared"
    }
}
j

Jeff Lockhart

10/07/2023, 9:01 PM
Yes, exactly.
❤️ 1
a

abdelrahmanesam20000

10/07/2023, 9:02 PM
I am really grateful for you ... thank you so much
👍 1
3 Views