Vlad
01/03/2025, 1:14 PMshared
gradle project added to iosApp
as cocoapod dependency.
shared
has cocoapods plugin and depends on A
which depends on B
.
B
aslo has cocoapods plugin and depends on pods for internal implementation.
As soon I add any X
pod to B
's cocoapods{} xcode build fails with:
<http://Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld|Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld> invocation reported errors
if I don't add any pods into B
- all good.
Interesting thing that if I also add X
pod into shared
cocoapods{} - everything works. Although I really don't want to do that, because X
will not be used for all possible builds of the project.
I read similar topics and seems like that setup should be possible.
Could any help to figure out what I am missing. Can I get more descriptive build error out of xcode?tapchicoma
01/07/2025, 8:58 AMAndrey Yastrebov
01/07/2025, 9:01 AMVlad
01/07/2025, 12:05 PMTestDependencyOne
or remove comment for the pod in shared, xcode project builds just fineAndrey Yastrebov
01/07/2025, 4:06 PMlinkOnly
flag for shared
module. Check the updated project in the attachVlad
01/07/2025, 5:32 PMlinkOnly
Instructs the CocoaPods plugin to use Pod dependencies with dynamic frameworks without generating cinterop bindings.
Does that mean that for dynamic framework (shared.build.gradle -> cocoapods { isStatic = false}) with linkOnly = true
for the pod, which is still added into shared
, we will have the pod installed, but we will just not have kotlin code generated for it for use.
If that true - that is not great. Because what if we add that pod only conditionally in the TestDependencyOne
and the conditional build logic should applied in the library.
And we also will have to know upfront what pods are used in our shared dependencies so you can link them?Vlad
01/07/2025, 5:33 PMAndrey Yastrebov
01/08/2025, 9:49 AMjust not have kotlin code generated for it for useNo, the cinterop code will be also available in shared
have to know upfront what pods are used in our shared dependenciesyes