yonaskolb / XcodeGen

A Swift command line tool for generating your Xcode project
MIT License
6.88k stars 809 forks source link

Why Isn't watchOS a Supported Destination? #1441

Closed VaslD closed 1 month ago

VaslD commented 5 months ago

According to the Project Spec, valid platforms are:

But valid supportedDestinations are:

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.

giginet commented 5 months ago

This will be resolved by https://github.com/yonaskolb/XcodeGen/pull/1438

zewuchen commented 1 month ago

This issue was fixed in Release 2.41.0. Can you close?