yonaskolb / XcodeGen

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

Add watchOS as a supported destination #1438

Closed tatsuky closed 4 months ago

tatsuky commented 5 months ago

Hi, I'm new to this project. This PR adds the watchOS support for the supportedDestinations configuration, initially added in #1336.

Changes

Tests

You can use the following example spec to verify the changes.

name: MyProject
options:
  bundleIdPrefix: com.myapp
targets:
  MyWatchKitApp:
    type: application
    platform: watchOS
    sources: [MyWatchKitApp]
    settings:
      MARKETING_VERSION: 1
      CURRENT_PROJECT_VERSION: 1
    dependencies:
      - target: MyFramework
    info:
      path: MyWatchKitApp/Info.plist
      properties:
        WKCompanionAppBundleIdentifier: com.myapp
        WKApplication: true
  MyFramework:
    type: framework
    supportedDestinations: [iOS, watchOS]
    platform: iOS
    sources: [MyFramework]
    settings:
      GENERATE_INFOPLIST_FILE: YES

Thanks.