Sonny
11/01/2024, 4:18 PMandroidMain
, 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?François
11/01/2024, 7:20 PMSonny
11/01/2024, 7:37 PMExecuting of '/opt/homebrew/bin/pod install' failed with code 1 and message:
Analyzing dependencies
[!] The platform of the target `tvos` (tvOS 15.0) is not compatible with `iOS-Framework3 (5.0.0)`, which does not support `tvOS`.
François
11/01/2024, 8:00 PMFrançois
11/01/2024, 8:00 PMFrançois
11/01/2024, 8:02 PMFrançois
11/01/2024, 8:04 PMSonny
11/01/2024, 8:17 PMcocoapods {
...
pod(name = "Framework1")
// iOS only
pod(name = "iOS-Framework2")
// tvOS only
pod(name = "tvOS-Framework3")
}
Sonny
11/04/2024, 2:42 PM