Skip to content

Commit ee684c3

Browse files
committed
Create CapabilityType + ExpressibleByArgument
1 parent 4405db6 commit ee684c3

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright 2020 Itty Bitty Apps Pty Ltd
2+
3+
import AppStoreConnect_Swift_SDK
4+
import ArgumentParser
5+
import Foundation
6+
7+
extension CapabilityType: CaseIterable, ExpressibleByArgument, CustomStringConvertible {
8+
public typealias AllCases = [CapabilityType]
9+
10+
public static var allCases: AllCases {
11+
[
12+
.icloud,
13+
.inAppPurchase,
14+
.gameCenter,
15+
.pushNotifications,
16+
.wallet,
17+
.interAppAudio,
18+
.maps,
19+
.associatedDomains,
20+
.personalVpn,
21+
.appGroups,
22+
.healthkit,
23+
.homekit,
24+
.wirelessAccessoryConfiguration,
25+
.applePay,
26+
.dataProtection,
27+
.sirikit,
28+
.networkExtensions,
29+
.multipath,
30+
.hotSpot,
31+
.nfcTagReading,
32+
.classkit,
33+
.autofillCredentialProvider,
34+
.accessWifiInformation
35+
]
36+
}
37+
38+
public init?(argument: String) {
39+
self.init(rawValue: argument.uppercased())
40+
}
41+
42+
public var description: String {
43+
rawValue.lowercased()
44+
}
45+
}

0 commit comments

Comments
 (0)