As far as I can tell, CocoaPods are not yet natively supporting visionOS
. While visionOS
has capability to run iOS/iPadOS apps, Xcode sees visionOS
as its own operating system, and doesn't interpret iOS/iPadOS Pods as being compatible with visionOS
.
There is a now-merged pull request in the CocoaPods repo that adds visionOS
support to CocoaPods, but it's worth noting (at least at the time of this writing) that that pull request has not been released in a new CocoaPods version, so if it's something you want to leverage, you'll need to directly target the merged pull request's changes in a custom CocoaPods installation. There is some guidance here on how to do that (effectively using Bundler to target a CocoaPods commit, instead of the publicly released CocoaPods version).
It's further worth noting that a Podfile can only target one operating system per app target, which effectively means that if your app target is targeting iOS/iPadOS and visionOS, the Podifle is not going to work. I've been successful in getting this to work by creating a new app target in Xcode (File -> New -> Target -> visionOS -> App) that builds for visionOS directly, and not a target that builds for iOS/iPadOS and visionOS.
TLDR; It seems like CocoaPods is not natively compatible with visionOS yet, and there may be a number of hurdles to overcome with getting an app that uses CocoaPods to build on visionOS natively. This is a great time to consider Swift Package Manager (if that's practical for you) to negate this, but given the newness of visionOS, more work seems to need to be done to handle CocoaPods on visionOS (since every Pod likely only references iOS/iPadOS, and not visionOS, itself).