Add explicit visionOS support to DataCompression #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds explicit support for visionOS to both the CocoaPods
podspecand the SPMPackage.swiftmanifest.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 thoughDataCompressiondoes not currently declarevisionOSsupport explicitly).I really don't know how's that possible, probably because:
visionOSas long as no platform-specific APIs or#if os(...)conditions prevent compatibility.or
However, CocoaPods does validate platform declarations during
pod lib lint, and the lack of explicit support causes validation to fail.Changes
.podspec(s.visionos.deployment_target = '1.0').swift-tools-versionto5.9inPackage.swiftto explicitly supportvisionOSas a platform..podspecand thePackage.swiftto 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.podpsecandPackage.swift) untouched.