Skip to content

Commit d6c996e

Browse files
authored
Extend the availability annotations for the Netrc support to cover all the Darwin platforms (#218)
This extends the availability based on the version numbers in the annotation for `NSTextCheckingResult.range(withName name: String) -> NSRange`. Otherwise, ToolsSupportCore can no longer build on for example iOS, because the default minimum deployment targets for the various platforms are really old (e.g. iOS 9).
1 parent fc5b8a5 commit d6c996e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/TSCUtility/Netrc.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ extension AuthorizationProviding {
1515

1616
/*
1717
Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
18-
which is only available in macOS 10.13+ at this time.
18+
which is only available in macOS 10.13+, iOS 11+, etc at this time.
1919
*/
20-
@available (OSX 10.13, *)
20+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
2121
/// Container of parsed netrc connection settings
2222
public struct Netrc: AuthorizationProviding {
2323
/// Representation of `machine` connection settings & `default` connection settings.
@@ -88,7 +88,7 @@ public struct Netrc: AuthorizationProviding {
8888
}
8989
}
9090

91-
@available (OSX 10.13, *)
91+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
9292
public extension Netrc {
9393
enum Error: Swift.Error {
9494
case invalidFilePath
@@ -126,14 +126,14 @@ public extension Netrc {
126126
}
127127
}
128128

129-
@available (OSX 10.13, *)
129+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
130130
extension Netrc.Error: CustomNSError {
131131
public var errorUserInfo: [String : Any] {
132132
return [NSLocalizedDescriptionKey: "\(self)"]
133133
}
134134
}
135135

136-
@available (OSX 10.13, *)
136+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
137137
fileprivate enum RegexUtil {
138138
@frozen fileprivate enum Token: String, CaseIterable {
139139
case machine, login, password, account, macdef, `default`

0 commit comments

Comments
 (0)