Skip to content

Commit 340068d

Browse files
authored
Merge pull request #3 from pointfreeco/fix-swiftui-archival
Change platform requirements
2 parents d6c3b5f + eb38626 commit 340068d

File tree

2 files changed

+98
-90
lines changed

2 files changed

+98
-90
lines changed

Package.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import PackageDescription
44

55
let package = Package(
66
name: "swift-custom-dump",
7+
platforms: [
8+
.iOS(.v13),
9+
.macOS(.v10_15),
10+
.tvOS(.v13),
11+
.watchOS(.v6),
12+
],
713
products: [
814
.library(
915
name: "CustomDump",
Lines changed: 92 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
#if canImport(GameKit)
22
import GameKit
33

4-
// @available(iOS 14, macOS 11, macCatalyst 14, tvOS 14, *)
5-
// extension GKAccessPoint.Location: CustomDumpStringConvertible {
6-
// public var customDumpDescription: String {
7-
// switch self {
8-
// case .bottomLeading:
9-
// return "GKAccessPoint.Location.bottomLeading"
10-
// case .bottomTrailing:
11-
// return "GKAccessPoint.Location.bottomTrailing"
12-
// case .topLeading:
13-
// return "GKAccessPoint.Location.topLeading"
14-
// case .topTrailing:
15-
// return "GKAccessPoint.Location.topTrailing"
16-
// @unknown default:
17-
// return "GKAccessPoint.Location.(@unknown default, rawValue: \(self.rawValue))"
18-
// }
19-
// }
20-
// }
4+
#if compiler(>=5.5)
5+
@available(iOS 14, macOS 11, macCatalyst 14, tvOS 14, *)
6+
extension GKAccessPoint.Location: CustomDumpStringConvertible {
7+
public var customDumpDescription: String {
8+
switch self {
9+
case .bottomLeading:
10+
return "GKAccessPoint.Location.bottomLeading"
11+
case .bottomTrailing:
12+
return "GKAccessPoint.Location.bottomTrailing"
13+
case .topLeading:
14+
return "GKAccessPoint.Location.topLeading"
15+
case .topTrailing:
16+
return "GKAccessPoint.Location.topTrailing"
17+
@unknown default:
18+
return "GKAccessPoint.Location.(@unknown default, rawValue: \(self.rawValue))"
19+
}
20+
}
21+
}
22+
#endif
2123

2224
#if !os(watchOS)
2325
@available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, *)
@@ -36,78 +38,78 @@
3638
}
3739
#endif
3840

39-
// @available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, watchOS 3, *)
40-
// @available(watchOS, unavailable)
41-
// extension GKTurnBasedMatch.Outcome: CustomDumpStringConvertible {
42-
// public var customDumpDescription: String {
43-
// switch self {
44-
// case .customRange:
45-
// return "GKTurnBasedMatch.Outcome.customRange"
46-
// case .first:
47-
// return "GKTurnBasedMatch.Outcome.first"
48-
// case .fourth:
49-
// return "GKTurnBasedMatch.Outcome.fourth"
50-
// case .lost:
51-
// return "GKTurnBasedMatch.Outcome.lost"
52-
// case .none:
53-
// return "GKTurnBasedMatch.Outcome.none"
54-
// case .quit:
55-
// return "GKTurnBasedMatch.Outcome.quit"
56-
// case .second:
57-
// return "GKTurnBasedMatch.Outcome.second"
58-
// case .tied:
59-
// return "GKTurnBasedMatch.Outcome.tied"
60-
// case .timeExpired:
61-
// return "GKTurnBasedMatch.Outcome.timeExpired"
62-
// case .third:
63-
// return "GKTurnBasedMatch.Outcome.third"
64-
// case .won:
65-
// return "GKTurnBasedMatch.Outcome.won"
66-
// @unknown default:
67-
// return "GKTurnBasedMatch.Outcome.(@unknown default, rawValue: \(self.rawValue))"
68-
// }
69-
// }
70-
// }
41+
@available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, watchOS 3, *)
42+
@available(watchOS, unavailable)
43+
extension GKTurnBasedMatch.Outcome: CustomDumpStringConvertible {
44+
public var customDumpDescription: String {
45+
switch self {
46+
case .customRange:
47+
return "GKTurnBasedMatch.Outcome.customRange"
48+
case .first:
49+
return "GKTurnBasedMatch.Outcome.first"
50+
case .fourth:
51+
return "GKTurnBasedMatch.Outcome.fourth"
52+
case .lost:
53+
return "GKTurnBasedMatch.Outcome.lost"
54+
case .none:
55+
return "GKTurnBasedMatch.Outcome.none"
56+
case .quit:
57+
return "GKTurnBasedMatch.Outcome.quit"
58+
case .second:
59+
return "GKTurnBasedMatch.Outcome.second"
60+
case .tied:
61+
return "GKTurnBasedMatch.Outcome.tied"
62+
case .timeExpired:
63+
return "GKTurnBasedMatch.Outcome.timeExpired"
64+
case .third:
65+
return "GKTurnBasedMatch.Outcome.third"
66+
case .won:
67+
return "GKTurnBasedMatch.Outcome.won"
68+
@unknown default:
69+
return "GKTurnBasedMatch.Outcome.(@unknown default, rawValue: \(self.rawValue))"
70+
}
71+
}
72+
}
7173

72-
// @available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, watchOS 3, *)
73-
// @available(watchOS, unavailable)
74-
// extension GKTurnBasedMatch.Status: CustomDumpStringConvertible {
75-
// public var customDumpDescription: String {
76-
// switch self {
77-
// case .ended:
78-
// return "GKTurnBasedMatch.Status.ended"
79-
// case .matching:
80-
// return "GKTurnBasedMatch.Status.matching"
81-
// case .open:
82-
// return "GKTurnBasedMatch.Status.open"
83-
// case .unknown:
84-
// return "GKTurnBasedMatch.Status.unknown"
85-
// @unknown default:
86-
// return "GKTurnBasedMatch.Status.(@unknown default, rawValue: \(self.rawValue))"
87-
// }
88-
// }
89-
// }
90-
//
91-
// @available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, watchOS 3, *)
92-
// @available(watchOS, unavailable)
93-
// extension GKTurnBasedParticipant.Status: CustomDumpStringConvertible {
94-
// public var customDumpDescription: String {
95-
// switch self {
96-
// case .active:
97-
// return "GKTurnBasedParticipant.Status.active"
98-
// case .declined:
99-
// return "GKTurnBasedParticipant.Status.declined"
100-
// case .done:
101-
// return "GKTurnBasedParticipant.Status.done"
102-
// case .invited:
103-
// return "GKTurnBasedParticipant.Status.invited"
104-
// case .matching:
105-
// return "GKTurnBasedParticipant.Status.matching"
106-
// case .unknown:
107-
// return "GKTurnBasedParticipant.Status.unknown"
108-
// @unknown default:
109-
// return "GKTurnBasedParticipant.Status.(@unknown default, rawValue: \(self.rawValue))"
110-
// }
111-
// }
112-
// }
74+
@available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, watchOS 3, *)
75+
@available(watchOS, unavailable)
76+
extension GKTurnBasedMatch.Status: CustomDumpStringConvertible {
77+
public var customDumpDescription: String {
78+
switch self {
79+
case .ended:
80+
return "GKTurnBasedMatch.Status.ended"
81+
case .matching:
82+
return "GKTurnBasedMatch.Status.matching"
83+
case .open:
84+
return "GKTurnBasedMatch.Status.open"
85+
case .unknown:
86+
return "GKTurnBasedMatch.Status.unknown"
87+
@unknown default:
88+
return "GKTurnBasedMatch.Status.(@unknown default, rawValue: \(self.rawValue))"
89+
}
90+
}
91+
}
92+
93+
@available(iOS 5, macCatalyst 13, macOS 10.8, tvOS 9, watchOS 3, *)
94+
@available(watchOS, unavailable)
95+
extension GKTurnBasedParticipant.Status: CustomDumpStringConvertible {
96+
public var customDumpDescription: String {
97+
switch self {
98+
case .active:
99+
return "GKTurnBasedParticipant.Status.active"
100+
case .declined:
101+
return "GKTurnBasedParticipant.Status.declined"
102+
case .done:
103+
return "GKTurnBasedParticipant.Status.done"
104+
case .invited:
105+
return "GKTurnBasedParticipant.Status.invited"
106+
case .matching:
107+
return "GKTurnBasedParticipant.Status.matching"
108+
case .unknown:
109+
return "GKTurnBasedParticipant.Status.unknown"
110+
@unknown default:
111+
return "GKTurnBasedParticipant.Status.(@unknown default, rawValue: \(self.rawValue))"
112+
}
113+
}
114+
}
113115
#endif

0 commit comments

Comments
 (0)