https://kotlinlang.org logo
#ios
Title
# ios
d

darkmoon_uk

10/19/2020, 12:54 AM
I'm facing a similar (but not identical) issue to @Derek Ellis above ☝️ (Derek, maybe you'll hit this one next...) I can get my Kotlin
shared
module to compile with Cocoapods dependencies just fine. But when finally building/linking the App in Xcode, the linker(?) complains that it can't see the transient dependency symbols. It it expected that I have to set up the dependencies twice, once for the
shared
module, and then again for the overall Xcode project? I can't find any specific reference to this workflow in the docs.
a

Artyom Degtyarev [JB]

10/19/2020, 7:31 AM
Hello, @darkmoon_uk, could you please add some details? At least about the project structure. As documentations states, creating and using
.xcworkspace
should be enough.
d

dazza5000

10/19/2020, 4:05 PM
My understanding is that frameworks are not bundled
You have to include the dependency in your xcode project too
d

darkmoon_uk

10/22/2020, 1:29 AM
This was all my own fault (of course!) - I hadn't set up the top level project properly as a Cocoapods project. Once both the top-level (Xcode App) and shared (Gradle) projects were defined for Cocoapods, the transitive Pod dependencies of the shared project were automatically linked, by Cocoapods, into the final App build 👍 Relevant JB docs
d

dazza5000

10/22/2020, 1:33 AM
Good to hear. Did you do that setup om build.gradle?
d

darkmoon_uk

10/24/2020, 2:07 PM
The fix to integrate Cocoapods with the top-level project was not in Gradle, no. But I only had to specify the dependencies in the Gradle file.
Once I'd configured the top-level project for Cocoapods properly as per JB docs; Cocoapods 'did it's thing' and resolved the transitive dependencies (via my Gradle-defined shared module) at build time.
3 Views