Reputation: 54111
The platforms property in a Package.swift
file restricts available platforms for the whole package. Is there a way to specify platforms for individual targets or libraries?
I have a Swift package that has a "full" target requiring iOS or tvOS (for UIKit) and a backend (model) sub-target that can also run on watchOS and macOS.
Upvotes: 8
Views: 1057
Reputation: 2025
there's this: https://developer.apple.com/documentation/packagedescription/target/dependency/target(name:condition:) where you can define conditions per target: https://developer.apple.com/documentation/packagedescription/targetdependencycondition
Upvotes: 0