Skip to content

Commit afe0b95

Browse files
authored
Fix compile failure on iOS for Mac Catalyst support (#356)
* Fix compile failure on iOS * Add sortedKeys API check for tvOS and watchOS
1 parent fd4c3b6 commit afe0b95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/ArgumentParser/Usage/DumpHelpGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal struct DumpHelpGenerator {
2626
func rendered() -> String {
2727
let encoder = JSONEncoder()
2828
encoder.outputFormatting = .prettyPrinted
29-
if #available(macOS 10.13, *) {
29+
if #available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) {
3030
encoder.outputFormatting.insert(.sortedKeys)
3131
}
3232
guard let encoded = try? encoder.encode(self.toolInfo) else { return "" }

0 commit comments

Comments
 (0)