XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

Why Isn't watchOS a Supported Destination?

Open VaslD opened this issue 1 year ago • 1 comments

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.

VaslD avatar Jan 26 '24 15:01 VaslD

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

giginet avatar Jan 29 '24 01:01 giginet

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

zewuchen avatar May 24 '24 01:05 zewuchen