Enumerationswift-package-manager 6.0.3Basics
Availability
Triple+Platforms.swift:355enum Availability
enum Availability
import Basics
struct FeatureAvailability
Represents the availability of a feature that is supported on some platforms and versions, but not all. For Darwin versions, the version numbers provided should be the version where the feature was added or the change was introduced, because all version checks are in the form of tripleVersion >= featureVersion
.
@dynamicMemberLookup struct Triple
Helper for working with target triples.
case unavailable
case available(since: Version)
case availableInAllVersions
init(macOS: Availability, iOS: Availability, tvOS: Availability, watchOS: Availability, nonDarwin: Bool = false)
Describes the availability of a feature that is supported on multiple platforms, but is tied to a particular version.
let iOS: Availability
let macOS: Availability
let nonDarwin: Bool
let tvOS: Availability
let watchOS: Availability
subscript(darwinPlatform: DarwinPlatform) -> Availability { get }
Returns the version when the feature was introduced on the specified Darwin platform, or .unavailable
if the feature has not been introduced there.