Why Isn't watchOS a Supported Destination?
According to the Project Spec, valid platforms are:
-
iOS -
tvOS -
macOS -
watchOS -
visionOS
But valid supportedDestinations are:
-
iOS -
tvOS -
macOS -
macCatalyst -
visionOS
Which means the following project definition generates a multiplatform (Xcode 14+) ArgumentParser.framework available to all Apple platforms except watchOS:
targets:
ArgumentParser:
type: framework
# platform: auto (implicit)
supportedDestinations:
- iOS
- macOS
- tvOS
- watchOS # unrecognized
- visionOS
sources:
- path: "ArgumentParser/Sources/ArgumentParser"
includes:
- "**/*.swift"
settings:
BUILD_LIBRARY_FOR_DISTRIBUTION: YES
SKIP_INSTALL: NO
MAKETING_VERSION: "1.3.0"
I don't understand why watchOS was left unsupported. If I first generated a project without watchOS support, and then added watchOS destination in the Xcode project editor, the only changes appeared on Git were:
- SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
+ SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
- TARGETED_DEVICE_FAMILY = "1,2,3,7";
+ TARGETED_DEVICE_FAMILY = "1,2,3,4,7";
It didn't seem like there would be a technically restriction, or even too much work, on adding watchOS as a supportedDestinations.
This will be resolved by https://github.com/yonaskolb/XcodeGen/pull/1438
This issue was fixed in Release 2.41.0. Can you close?