Skip to content

Conversation

@ArielDemarco
Copy link

@ArielDemarco ArielDemarco commented Jul 25, 2025

Overview

This PR adds explicit support for visionOS to both the CocoaPods podspec and the SPM Package.swift manifest.

Description

While building an SDK that depends on DataCompression (specifically, OpenTelemetry-Swift), I noticed that SPM was able to compile the package successfully for visionOS (even though DataCompression does not currently declare visionOS support explicitly).

I really don't know how's that possible, probably because:

  • SPM does not enforce strict platform declarations for visionOS as long as no platform-specific APIs or #if os(...) conditions prevent compatibility.
    or
  • Xcode 16 can implicitly attempt to build for visionOS if no incompatibilities are found.

However, CocoaPods does validate platform declarations during pod lib lint, and the lack of explicit support causes validation to fail.

Changes

  • Added visionOS support to the .podspec (s.visionos.deployment_target = '1.0').
  • Upgraded swift-tools-version to 5.9 in Package.swift to explicitly support visionOS as a platform.
  • Bumped the minimum deployment targets across all platforms (iOS, macOS, tvOS, watchOS) in both the .podspec and the Package.swift to align them and suppress Xcode warnings about deprecated versions.

Note

If you’d prefer not to raise the minimum deployment targets across all platforms, I’m happy to modify the PR to only add visionOS support in the .podspec, leaving the rest platforms (both in the .podpsec and Package.swift) untouched.

@naftaly
Copy link

naftaly commented Jul 31, 2025

@mw99 Are you open to reviewing this PR and merging it, we depend on the lib and need visionOS support. Thank you.

@mw99
Copy link
Owner

mw99 commented Aug 1, 2025

Sorry for the late reply. Will take a closer look now. Will try to get this in soon...

@mw99
Copy link
Owner

mw99 commented Aug 3, 2025

Hi again, I added your changes in the new released version 3.9.0.
However, I can't release it to cocoa pods yet because for the podspec lint I need to install visionOS support in Xcode, and that can only be done on Apple ARM hardware. Since I still have x86 here, I need a couple more days to solve that. For now I hope you are using the swift package manager 😅
Thanks for your contribution!

@ArielDemarco
Copy link
Author

I can raise a PR with an action to do the CocoaPods deployment in an MX mac. You'll probably need to add the credential in as a Github Secret

@ArielDemarco
Copy link
Author

Closed as it's already merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants