I have a KMP project that has the following targets:
androidMain
,
iosMain
and
tvosMain
. I am adding my iOS/tvOS dependencies using
Cocoapods. It works fine until I have a dependency that supports only one apple platform and not the other. My
build.gradle.kts
looks like this:
cocoapods {
version = "1.0"
ios.deploymentTarget = "15.0"
tvos.deploymentTarget = "15.0"
framework {
baseName = "PodsFramework"
}
pod(name = "Framework1")
// iOS only
pod(name = "iOS-Framework2")
// tvOS only
pod(name = "tvOS-Framework3")
}
Is it possible to add a "pod" only for iOS and not for tvOS? I expect the generated podspec to be:
spec.dependency = "Framework1"
spec.ios.dependency = "iOS-Framework2"
spec.tvos.dependency = "tvOS-Framework3"
The error that I am getting is:
Task :shared:podInstallSyntheticTvos FAILED
Is it possible to add platform specific dependencies like this?