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

Sivaraj

11/22/2023, 9:45 AM
Hey team, I'm seeing an issue while setting up our KMP - I added pods to the project, and linked them statically, but for some reason we can't import them and use them in the iOS main. I'm not seeing any errors in the gradle task, so I'm not sure how to debug this. Any advice would be really helpful! Here's our cocoapod script block
cocoapods {
// Required properties
// Specify the required Pod version here. Otherwise, the Gradle project version is used.
version = "1.0"
ios.deploymentTarget = "14.0"
summary = "Kotlin/Native module"
specRepos {
url("<https://github.com/CocoaPods/Specs.git>")
}
pod("xxxx") {
linkOnly = true
source = path(project.file("..../core-ios"))
extraOpts += listOf("-compiler-option", "-fmodules")
}
}
Also tried with out linkOnly, and in that case we are seeing "Packages cannot be imported" and build on the xCode also fails Showing Messages
ld: framework not found xxxx
Any help is very much appreciated
a

a-dd

11/22/2023, 1:14 PM
It’s expected that with
linkOnly
you couldn’t reference the library in kotlin.
s

Sivaraj

11/23/2023, 12:07 AM
@a-dd Thanks for that, but what could be the reasons for "Packages cannot be imported" when we are not linking. What is expected when we add the pod dependencies, will there be a framework file created for every pod.. What could be the reason for that ld: framework not found message.. Is there a link where we can better understand what goes behind.. Appreciate any pointers here
a

a-dd

11/23/2023, 11:38 AM
ld: framework not found
There can be many reasons for that. Could you share a full build log with
--info
?
s

Sivaraj

11/24/2023, 9:48 AM
Here are the logs for the issue reported. Couple of issues 1) Not able to import the cocoapod packages in the kmm module, getting
package cannot be imported
message in iOSmain 2) On the xcode side, getting the below error.. ld - framework not found Would appreciate if you can point me where the issue could be, not much useful info on the logs to decipher
Copy code
Showing Recent Messages
Task ':core:shared:savings:linkDebugFrameworkIosSimulatorArm64' is not up-to-date because:

  Task has failed previously.

Run in-process tool "konanc"

Entry point method = org.jetbrains.kotlin.cli.utilities.MainKt.daemonMainWithXcodeRenderer

Classpath = [

	/Users/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.20/konan/lib/kotlin-native-compiler-embeddable.jar

	/Users/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.20/konan/lib/trove4j.jar

]

Arguments = [

	-g

	-enable-assertions

	-Xinclude=/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/klib/savings.klib

	-library

	/Users/dev/worktrees/kmm/networking/build/classes/kotlin/iosSimulatorArm64/main/klib/networking.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-logging-iossimulatorarm64/2.3.4/f0a445741fd47d70a75b8057f4b98b64de01eb3e/ktor-client-logging.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-content-negotiation-iossimulatorarm64/2.3.4/883b76c4ee4c038673340334fae806172dda3856/ktor-client-content-negotiation.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-encoding-iossimulatorarm64/2.3.4/4fa2b32aceaee399f1cc1e7bc3542ce20d14513f/ktor-client-encoding.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-darwin-iossimulatorarm64/2.3.4/c5b4ab9e3dd4469671b126a1bf018e356d0968f3/ktor-client-darwin.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-core-iossimulatorarm64/2.3.4/90b36dc24472156496504e892487a8066985eb73/ktor-client-core.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-kotlinx-json-iossimulatorarm64/2.3.4/1d9a882afa7be2fa49835ebf5accb075105856cb/ktor-serialization-kotlinx-json.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-events-iossimulatorarm64/2.3.4/bb5a8b43e28058f78bf63c45ae137a64af0d53ca/ktor-events.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websocket-serialization-iossimulatorarm64/2.3.4/527e302b33703dbb23b39bab1e61862f00188001/ktor-websocket-serialization.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-kotlinx-iossimulatorarm64/2.3.4/ae17bf93996f0406e15865917f80773659e19c22/ktor-serialization-kotlinx.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-iossimulatorarm64/2.3.4/2f27f32117cc7cdb56ea2a2480c09fc6ced0be28/ktor-serialization.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websockets-iossimulatorarm64/2.3.4/96a642845500a8b6b3b4a035fe098066da7e3303/ktor-websockets.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-http-iossimulatorarm64/2.3.4/cad0a81724e0ec19e8b3c586be51c9c907952305/ktor-http.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iossimulatorarm64/2.3.4/8dc97d50ef28b4b8c63e004ecb4d43f6525ec979/ktor-utils.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iossimulatorarm64/2.3.4/fa3840329ddb1f341130ba458b6b24ad67e40f69/ktor-utils-cinterop-threadUtils.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-io-iossimulatorarm64/2.3.4/9afc9ff2efd0b49e715d556d0bb390a3ea6e6682/ktor-io.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-iossimulatorarm64/1.7.1/36582e6040b4ab69e1a987f2d645ef53426d2843/kotlinx-coroutines-core.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-datetime-iossimulatorarm64/0.4.1/227b2197b8effdb6906e7bd36179b9c4d8e8ee9b/kotlinx-datetime.klib

	-library

......

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/co.touchlab/stately-common-iossimulatorarm64/1.2.0/ed918e9bb5f834faf76b54c2d5b5a0d9e72ca344/stately-common.klib

	-library

	/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPAnalytics.klib

	-library

	/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPCore.klib

	-library

	/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPServices.klib

	-no-endorsed-libs

	-output

	/Users/dev/worktrees/kmm/Vendor/iOS/Checkouts/xcode-frameworks/Smartsaving.framework

	-produce

	framework

	-target

	ios_simulator_arm64

	-Xmulti-platform

	-Xexport-kdoc

	-Xexternal-dependencies=/var/folders/tq/1991wgc91877k10b96tf0yvw0000gq/T/kotlin-native-external-dependencies14824147210151743717.deps

]

Transformed arguments = [

	konanc

	-g

	-enable-assertions

	-Xinclude=/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/klib/savings.klib

	-library

	/Users/dev/worktrees/kmm/networking/build/classes/kotlin/iosSimulatorArm64/main/klib/networking.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-logging-iossimulatorarm64/2.3.4/f0a445741fd47d70a75b8057f4b98b64de01eb3e/ktor-client-logging.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-content-negotiation-iossimulatorarm64/2.3.4/883b76c4ee4c038673340334fae806172dda3856/ktor-client-content-negotiation.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-encoding-iossimulatorarm64/2.3.4/4fa2b32aceaee399f1cc1e7bc3542ce20d14513f/ktor-client-encoding.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-darwin-iossimulatorarm64/2.3.4/c5b4ab9e3dd4469671b126a1bf018e356d0968f3/ktor-client-darwin.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-core-iossimulatorarm64/2.3.4/90b36dc24472156496504e892487a8066985eb73/ktor-client-core.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-kotlinx-json-iossimulatorarm64/2.3.4/1d9a882afa7be2fa49835ebf5accb075105856cb/ktor-serialization-kotlinx-json.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-events-iossimulatorarm64/2.3.4/bb5a8b43e28058f78bf63c45ae137a64af0d53ca/ktor-events.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websocket-serialization-iossimulatorarm64/2.3.4/527e302b33703dbb23b39bab1e61862f00188001/ktor-websocket-serialization.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-kotlinx-iossimulatorarm64/2.3.4/ae17bf93996f0406e15865917f80773659e19c22/ktor-serialization-kotlinx.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-iossimulatorarm64/2.3.4/2f27f32117cc7cdb56ea2a2480c09fc6ced0be28/ktor-serialization.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websockets-iossimulatorarm64/2.3.4/96a642845500a8b6b3b4a035fe098066da7e3303/ktor-websockets.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-http-iossimulatorarm64/2.3.4/cad0a81724e0ec19e8b3c586be51c9c907952305/ktor-http.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iossimulatorarm64/2.3.4/8dc97d50ef28b4b8c63e004ecb4d43f6525ec979/ktor-utils.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iossimulatorarm64/2.3.4/fa3840329ddb1f341130ba458b6b24ad67e40f69/ktor-utils-cinterop-threadUtils.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-io-iossimulatorarm64/2.3.4/9afc9ff2efd0b49e715d556d0bb390a3ea6e6682/ktor-io.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-iossimulatorarm64/1.7.1/36582e6040b4ab69e1a987f2d645ef53426d2843/kotlinx-coroutines-core.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-datetime-iossimulatorarm64/0.4.1/227b2197b8effdb6906e7bd36179b9c4d8e8ee9b/kotlinx-datetime.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-json-iossimulatorarm64/1.5.1/26dfd4cd5be21ba48a270748eb01a0a64b87a67d/kotlinx-serialization-json.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.insert-koin/koin-core-iossimulatorarm64/3.2.0/b3647568e9d4b69c8df9e703babec15c48568915/koin-core.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-core-iossimulatorarm64/1.5.1/2c9e971a9eab407ba058019bab12cdc5ebeaaf45/kotlinx-serialization-core.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/io.github.aakira/napier-iossimulatorarm64/2.6.1/18ef742926a142f48c47700dc2165d93782710ba/napier.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/co.touchlab/stately-concurrency-iossimulatorarm64/1.2.0/1f1642fa123f1d29dde7597bf10a66e785641d02/stately-concurrency.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-iossimulatorarm64/0.20.2/7da249a49e14d957326ae4a4521d21c3bd49a727/atomicfu.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-iossimulatorarm64/0.20.2/9490de6634713dfbb05dff21d06dc5fcf11c361e/atomicfu-cinterop-interop.klib

	-library

	/Users/dev/.gradle/caches/modules-2/files-2.1/co.touchlab/stately-common-iossimulatorarm64/1.2.0/ed918e9bb5f834faf76b54c2d5b5a0d9e72ca344/stately-common.klib

	-library

	/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPAnalytics.klib

	-library

	/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPCore.klib

	-library

	/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPServices.klib

	-no-endorsed-libs

	-output

	/Users/dev/worktrees/kmm/Vendor/iOS/Checkouts/xcode-frameworks/Smartsaving.framework

	-produce

	framework

	-target

	ios_simulator_arm64

	-Xmulti-platform

	-Xexport-kdoc

	-Xexternal-dependencies=/var/folders/tq/1991wgc91877k10b96tf0yvw0000gq/T/kotlin-native-external-dependencies14824147210151743717.deps

]
The /Applications/Xcode14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.

output:

ld: framework not found AEPAnalytics
a

a-dd

11/24/2023, 10:04 AM
Could you try running
linkPodDebugFrameworkIosSimulatorArm64
task instead?
s

Sivaraj

11/24/2023, 10:43 AM
Here are the logs, task did complete successfully.
Copy code
Output property 'destinationDirectory' file /Users/dev/worktrees/kmm/Core/shared/savings/build/bin/iosSimulatorArm64/podDebugFramework/savings.framework.dSYM has been removed.
Run in-process tool "konanc"
Entry point method = org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain
Classpath = [
        /Users/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.20/konan/lib/kotlin-native-compiler-embeddable.jar
        /Users/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.20/konan/lib/trove4j.jar
]
Arguments = [
        -g
        -enable-assertions
        -Xinclude=/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/klib/savings.klib
        -library
        /Users/dev/worktrees/kmm/networking/build/classes/kotlin/iosSimulatorArm64/main/klib/networking.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-logging-iossimulatorarm64/2.3.4/f0a445741fd47d70a75b8057f4b98b64de01eb3e/ktor-client-logging.klib
  ......
        /Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPAnalytics.klib
        -library
        /Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPCore.klib
        -library
        /Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPServices.klib
        -no-endorsed-libs
        -output
        /Users/dev/worktrees/kmm/Core/shared/savings/build/bin/iosSimulatorArm64/podDebugFramework/savings.framework
        -produce
        framework
        -linker-option
        -framework
        -linker-option
        AEPServices
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPServices
        -linker-option
        -framework
        -linker-option
        AEPCore
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPCore
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPRulesEngine
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPServices
        -linker-option
        -framework
        -linker-option
        AEPAnalytics
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPAnalytics
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPCore
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPRulesEngine
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPServices
        -target
        ios_simulator_arm64
        -Xmulti-platform
        -Xexport-kdoc
        -Xexternal-dependencies=/var/folders/tq/1991wgc91877k10b96tf0yvw0000gq/T/kotlin-native-external-dependencies12323150951369061690.deps
]
Transformed arguments = [
        konanc
        -g
        -enable-assertions
        -Xinclude=/Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/klib/savings.klib
        -library
        /Users/dev/worktrees/kmm/networking/build/classes/kotlin/iosSimulatorArm64/main/klib/networking.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-logging-iossimulatorarm64/2.3.4/f0a445741fd47d70a75b8057f4b98b64de01eb3e/ktor-client-logging.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-content-negotiation-iossimulatorarm64/2.3.4/883b76c4ee4c038673340334fae806172dda3856/ktor-client-content-negotiation.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-encoding-iossimulatorarm64/2.3.4/4fa2b32aceaee399f1cc1e7bc3542ce20d14513f/ktor-client-encoding.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-darwin-iossimulatorarm64/2.3.4/c5b4ab9e3dd4469671b126a1bf018e356d0968f3/ktor-client-darwin.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-core-iossimulatorarm64/2.3.4/90b36dc24472156496504e892487a8066985eb73/ktor-client-core.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-kotlinx-json-iossimulatorarm64/2.3.4/1d9a882afa7be2fa49835ebf5accb075105856cb/ktor-serialization-kotlinx-json.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-events-iossimulatorarm64/2.3.4/bb5a8b43e28058f78bf63c45ae137a64af0d53ca/ktor-events.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websocket-serialization-iossimulatorarm64/2.3.4/527e302b33703dbb23b39bab1e61862f00188001/ktor-websocket-serialization.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-kotlinx-iossimulatorarm64/2.3.4/ae17bf93996f0406e15865917f80773659e19c22/ktor-serialization-kotlinx.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-serialization-iossimulatorarm64/2.3.4/2f27f32117cc7cdb56ea2a2480c09fc6ced0be28/ktor-serialization.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-websockets-iossimulatorarm64/2.3.4/96a642845500a8b6b3b4a035fe098066da7e3303/ktor-websockets.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-http-iossimulatorarm64/2.3.4/cad0a81724e0ec19e8b3c586be51c9c907952305/ktor-http.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iossimulatorarm64/2.3.4/8dc97d50ef28b4b8c63e004ecb4d43f6525ec979/ktor-utils.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-utils-iossimulatorarm64/2.3.4/fa3840329ddb1f341130ba458b6b24ad67e40f69/ktor-utils-cinterop-threadUtils.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-io-iossimulatorarm64/2.3.4/9afc9ff2efd0b49e715d556d0bb390a3ea6e6682/ktor-io.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-iossimulatorarm64/1.7.1/36582e6040b4ab69e1a987f2d645ef53426d2843/kotlinx-coroutines-core.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-datetime-iossimulatorarm64/0.4.1/227b2197b8effdb6906e7bd36179b9c4d8e8ee9b/kotlinx-datetime.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-json-iossimulatorarm64/1.5.1/26dfd4cd5be21ba48a270748eb01a0a64b87a67d/kotlinx-serialization-json.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.insert-koin/koin-core-iossimulatorarm64/3.2.0/b3647568e9d4b69c8df9e703babec15c48568915/koin-core.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-serialization-core-iossimulatorarm64/1.5.1/2c9e971a9eab407ba058019bab12cdc5ebeaaf45/kotlinx-serialization-core.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/io.github.aakira/napier-iossimulatorarm64/2.6.1/18ef742926a142f48c47700dc2165d93782710ba/napier.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/co.touchlab/stately-concurrency-iossimulatorarm64/1.2.0/1f1642fa123f1d29dde7597bf10a66e785641d02/stately-concurrency.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-iossimulatorarm64/0.20.2/7da249a49e14d957326ae4a4521d21c3bd49a727/atomicfu.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-iossimulatorarm64/0.20.2/9490de6634713dfbb05dff21d06dc5fcf11c361e/atomicfu-cinterop-interop.klib
        -library
        /Users/dev/.gradle/caches/modules-2/files-2.1/co.touchlab/stately-common-iossimulatorarm64/1.2.0/ed918e9bb5f834faf76b54c2d5b5a0d9e72ca344/stately-common.klib
        -library
        /Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPAnalytics.klib
        -library
        /Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPCore.klib
        -library
        /Users/dev/worktrees/kmm/Core/shared/savings/build/classes/kotlin/iosSimulatorArm64/main/cinterop/savings-cinterop-AEPServices.klib
        -no-endorsed-libs
        -output
        /Users/dev/worktrees/kmm/Core/shared/savings/build/bin/iosSimulatorArm64/podDebugFramework/savings.framework
        -produce
        framework
        -linker-option
        -framework
        -linker-option
        AEPServices
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPServices
        -linker-option
        -framework
        -linker-option
        AEPCore
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPCore
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPRulesEngine
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPServices
        -linker-option
        -framework
        -linker-option
        AEPAnalytics
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPAnalytics
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPCore
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPRulesEngine
        -linker-option
        -F/Users/dev/worktrees/kmm/Core/Shared/savings/build/cocoapods/synthetic/ios/build/Release-iphonesimulator/AEPServices
        -target
        ios_simulator_arm64
        -Xmulti-platform
        -Xexport-kdoc
        -Xexternal-dependencies=/var/folders/tq/1991wgc91877k10b96tf0yvw0000gq/T/kotlin-native-external-dependencies12323150951369061690.deps
]
a

a-dd

11/24/2023, 11:17 AM
Cocoapods plugin links pod-dependencies only to its own framework (which is declared implicitly by the plugin). If you have other frameworks declared in the build script they won’t see binaries from cocoapods
linkPodDebugFrameworkIosSimulatorArm64
builds the cocoapods plugin framework
linkDebugFrameworkIosSimulatorArm64
build some other framework, most likely you shoudn’t use this (or you’ll have to set up the linking manually)
s

Sivaraj

11/29/2023, 11:59 AM
Thanks @a-dd for sharing the details. I am able to reproduce the issue even with basic setup. Created a KMP sample app using the AS plugin and added a pod dependency, and its throwing an error. Not sure whether there is anything missing in the setup, but we just followed the documentation. We are noticing a couple of issues 1) in the shared code, unable to import the dependency library. Seeing the error as "Packages cannot be imported". And in xcode end, ld: framework 'AFNetworking' not found. Would you be able to have a look and advice on what is missing? https://github.com/SivarajSubramanian1/kmpcocoapods
a

a-dd

11/29/2023, 12:02 PM
Copy code
listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "shared"
        }
    }
and
Copy code
pod("AFNetworking")
declarations are not compatible as I’ve wrote earlier.
1
8 Views