Hello there! I have a kmm library which contains s...
# multiplatform
i
Hello there! I have a kmm library which contains some swift code which I then make use of in my kmm library. When I import this library through mavenLocal into another kmm project everything seems to have been imported fine. But when building that project for xcode or even using the assembleXCFramework I get the following error:
Copy code
KmmPlayground % ./gradlew podPublishXCFramework

> Task :shared:linkPodDebugFrameworkIosArm64 FAILED
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
ld: warning: ignoring duplicate libraries: '-ldl'
ld: framework 'SkPayment' not found

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:linkPodDebugFrameworkIosArm64'.
> Compilation finished with errors
d
i
No. I think that solution is for when you have to use the pod library in that kmm project. I've got that part working. The problem occurs when I use that kmm library in another kmm project. And it only occurs when I try to build the app for xcode, yet it seems to work fine on the android side.
To give you some more context: I have two KMM projects, both which required some code to be written in swift first and then be used over on the KMM IOs side. One was related to payments and the other firebase. Once these libraries are created and imported into my main project the android part works fine. However, when I try to either assembleXCFramework or build the project in xcode, I get a 'Framework [name of pod lib/swift package] not found' error. I then proceeded to add the following line in the ios portion of my gradle file of the project using the payment lib:
Copy code
export("ai.vyro:payment:1.0.0")
This changes the error to:- Following dependencies exported in the debugFramework binary are not specified as API-dependencies of a corresponding source set