hi, I have a question regarding <cocoapods depende...
# multiplatform
c
hi, I have a question regarding cocoapods dependencies. I've set up ios+watchos project so when I try to add a pod, the pod needs to have both ios and watchos dependencies. This seems logical, as the kmm generated cocoapod will go to both ios and watchos native project. Is there any workaround to have multiple kmm generated cocoapods(or framework) with the corresponding ios or watchos dependency? (my concrete use case: there is a cocoapod which only supports ios, so I can't add it to the project, because it doesn't have the things needed for watchos)
l
I think the easiest approach right now is to have a Podfile that imports your shared library instead of adding the pods in gradle.
If you take a look at https://github.com/joreilly/BikeShare you can see the iOS project has a pod file with two targets, one iOS and another WatchOS https://github.com/joreilly/BikeShare/blob/main/ios/BikeShare/Podfile
c
yep, thank you, I use it like that, however this means, if you have another target beside ios(eg: watchos or widget) there is a good chance you can't implement business logic inside the common module, because probably not all cocoapod targets all platforms(ios, watchos, etc).