Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watchOS as a supported destination #1438

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions SettingPresets/SupportedDestinations/watchOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SUPPORTED_PLATFORMS: watchos watchsimulator
TARGETED_DEVICE_FAMILY: '4'
5 changes: 5 additions & 0 deletions Sources/ProjectSpec/SupportedDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ public enum SupportedDestination: String, CaseIterable {
case tvOS
case macOS
case macCatalyst
case watchOS
case visionOS
}

Expand All @@ -20,6 +21,8 @@ extension SupportedDestination {
return "macos"
case .macCatalyst:
return "maccatalyst"
case .watchOS:
return "watchos"
case .visionOS:
return "xros"
}
Expand All @@ -40,6 +43,8 @@ extension SupportedDestination {
return 3
case .macCatalyst:
return 4
case .watchOS:
return 5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yonaskolb and @amatig,
I'm wondering why the priorities are currently in this order and where watchOS should be. Any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding test cases helped me realize this - TARGETED_DEVICE_FAMILY and SUPPORTED_PLATFORMS are ordered based on this priority. watchOS is 4, meaning it needs to be between tvOS (3) and visionOS (7).

}
}
}