Build Information
Failed to build Cobalt, reference v10.1.4 (33c8f0
), with Swift 6.0 for macOS (SPM) on 1 Dec 2024 03:00:47 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
59 | }
60 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:36:28: error: 'AnyCancellable' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
35 |
36 | var cancellables = Set<AnyCancellable>()
| `- error: 'AnyCancellable' is only available in macOS 10.15 or newer
37 |
38 | public var accessToken: AccessToken? {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/RequestQueue.swift:68:36: error: 'sink(receiveCompletion:receiveValue:)' is only available in macOS 10.15 or newer
10 | import Combine
11 |
12 | class RequestQueue {
| `- note: add @available attribute to enclosing class
13 | private weak var apiClient: CobaltClient!
14 | private(set) var requests: [CobaltRequest] = []
:
59 | }
60 |
61 | func handle(request: CobaltRequest) {
| `- note: add @available attribute to enclosing instance method
62 | let subject = _map[request]
63 | removeFirst()
:
66 | }
67 |
68 | apiClient.request(request).sink(receiveCompletion: { event in
| |- error: 'sink(receiveCompletion:receiveValue:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
69 | switch event {
70 | case .finished:
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/RequestQueue.swift:78:12: error: 'store(in:)' is only available in macOS 10.15 or newer
10 | import Combine
11 |
12 | class RequestQueue {
| `- note: add @available attribute to enclosing class
13 | private weak var apiClient: CobaltClient!
14 | private(set) var requests: [CobaltRequest] = []
:
59 | }
60 |
61 | func handle(request: CobaltRequest) {
| `- note: add @available attribute to enclosing instance method
62 | let subject = _map[request]
63 | removeFirst()
:
76 | }, receiveValue: { response in
77 | subject?.send(response)
78 | }).store(in: &apiClient.cancellables)
| |- error: 'store(in:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
79 | }
80 | }
[60/71] Compiling Cobalt CobaltConfig.swift
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:14:14: warning: non-final class 'CobaltError' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | import Alamofire
13 |
14 | public class CobaltError: Error {
| `- warning: non-final class 'CobaltError' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
15 |
16 | private(set) public var code: Int = 0
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:16:29: warning: stored property 'code' of 'Sendable'-conforming class 'CobaltError' is mutable; this is an error in the Swift 6 language mode
14 | public class CobaltError: Error {
15 |
16 | private(set) public var code: Int = 0
| `- warning: stored property 'code' of 'Sendable'-conforming class 'CobaltError' is mutable; this is an error in the Swift 6 language mode
17 | private(set) public var response: CobaltResponse?
18 | private(set) public var message: String?
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:165:48: error: 'AnyPublisher' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
167 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:166:16: error: 'Fail' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
| |- error: 'Fail' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
167 | }
168 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:166:50: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
167 | }
168 | }
[61/71] Compiling Cobalt CobaltError.swift
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:14:14: warning: non-final class 'CobaltError' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | import Alamofire
13 |
14 | public class CobaltError: Error {
| `- warning: non-final class 'CobaltError' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
15 |
16 | private(set) public var code: Int = 0
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:16:29: warning: stored property 'code' of 'Sendable'-conforming class 'CobaltError' is mutable; this is an error in the Swift 6 language mode
14 | public class CobaltError: Error {
15 |
16 | private(set) public var code: Int = 0
| `- warning: stored property 'code' of 'Sendable'-conforming class 'CobaltError' is mutable; this is an error in the Swift 6 language mode
17 | private(set) public var response: CobaltResponse?
18 | private(set) public var message: String?
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:165:48: error: 'AnyPublisher' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
167 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:166:16: error: 'Fail' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
| |- error: 'Fail' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
167 | }
168 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:166:50: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
167 | }
168 | }
[62/71] Compiling Cobalt resource_bundle_accessor.swift
[63/71] Compiling Cobalt CobaltRequest.swift
[64/71] Compiling Cobalt CobaltResponse.swift
[65/71] Compiling Cobalt AuthenticationProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:29:47: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:102:74: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
103 | var parameters: Parameters = [:]
104 | var grantType = grantType
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:141:136: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:204:82: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:257:111: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
255 | }
256 |
257 | func requestTokenFromAuthorizationCode(initialRequest request: AuthorizationCodeRequest, code: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
258 | var parameters = [
259 | "redirect_uri": request.redirectUri,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:322:64: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:348:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
350 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:347:11: error: 'AnyPublisher' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:93:16: error: 'Just' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
:
91 | }
92 |
93 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:93:30: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
:
91 | }
92 |
93 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:93:67: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
:
91 | }
92 |
93 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:116:24: error: 'Just' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
114 | }
115 | request.useHeaders["Authorization"] = "Bearer " + accessToken
116 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:116:38: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
114 | }
115 | request.useHeaders["Authorization"] = "Bearer " + accessToken
116 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:116:75: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
114 | }
115 | request.useHeaders["Authorization"] = "Bearer " + accessToken
116 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:133:14: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
131 |
132 | return sendOAuthRequest(initialRequest: request, grantType: grantType, parameters: parameters)
133 | .flatMap { [weak self] _ -> AnyPublisher<CobaltRequest, CobaltError> in
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
134 | guard let self = self else {
135 | return AnyPublisher<CobaltRequest, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:133:41: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
131 |
132 | return sendOAuthRequest(initialRequest: request, grantType: grantType, parameters: parameters)
133 | .flatMap { [weak self] _ -> AnyPublisher<CobaltRequest, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
134 | guard let self = self else {
135 | return AnyPublisher<CobaltRequest, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:135:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
133 | .flatMap { [weak self] _ -> AnyPublisher<CobaltRequest, CobaltError> in
134 | guard let self = self else {
135 | return AnyPublisher<CobaltRequest, CobaltError>.never()
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | }
137 | return self._authorizeOAuth(request: request, grantType: grantType)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:138:15: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
136 | }
137 | return self._authorizeOAuth(request: request, grantType: grantType)
138 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
139 | }
140 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:173:40: error: 'tryMap' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
171 | }
172 |
173 | return client.request(request).tryMap { [weak self, client] response -> Void in
| |- error: 'tryMap' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
174 | let accessToken = try response.map(to: AccessToken.self)
175 | accessToken.host = (request.host ?? client?.config.host) ?? ""
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:180:13: error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
178 |
179 | client?.logger?.debug("Store access-token: \(optionalDescription(accessToken))")
180 | client?.authorizationGrantType = accessToken.grantType
| |- error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
181 | self?.isAuthenticating = false
182 | return ()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:183:11: error: 'tryCatch' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
181 | self?.isAuthenticating = false
182 | return ()
183 | }.tryCatch { [weak self, client] error -> AnyPublisher<Void, CobaltError> in
| |- error: 'tryCatch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
184 | defer {
185 | self?.isAuthenticating = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:183:51: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
181 | self?.isAuthenticating = false
182 | return ()
183 | }.tryCatch { [weak self, client] error -> AnyPublisher<Void, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
184 | defer {
185 | self?.isAuthenticating = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:197:11: error: 'mapError' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
195 |
196 | throw CobaltError.refreshTokenInvalidated
197 | }.mapError { error in
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
198 | return CobaltError(from: error).set(request: request)
199 | }.eraseToAnyPublisher()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:199:11: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
197 | }.mapError { error in
198 | return CobaltError(from: error).set(request: request)
199 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
200 | }
201 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:205:16: error: 'Deferred' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
| |- error: 'Deferred' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
206 | Future { promise in
207 | guard let strongSelf = self else {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:206:13: error: 'Future' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
| |- error: 'Future' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
207 | guard let strongSelf = self else {
208 | promise(.failure(CobaltError.unknown()))
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:254:11: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
:
252 |
253 | }
254 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
255 | }
256 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:316:9: error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
305 | /// - Returns: `Void`
306 | ///
307 | func handleManualOAuthRequest(grantType: OAuthenticationGrantType,
| `- note: add @available attribute to enclosing instance method
308 | accessToken: String,
309 | refreshToken: String,
:
314 |
315 | client.logger?.debug("Store access-token: \(optionalDescription(accessToken))")
316 | client.authorizationGrantType = grantType
| |- error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
317 | }
318 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:343:16: error: 'Fail' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
:
341 | return client.request(request)
342 | }
343 | return Fail(error: CobaltError(from: error)).eraseToAnyPublisher()
| |- error: 'Fail' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
344 | }
345 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:343:54: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
:
341 | return client.request(request)
342 | }
343 | return Fail(error: CobaltError(from: error)).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
344 | }
345 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:349:16: error: 'Empty' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
| |- error: 'Empty' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
350 | }
351 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:349:102: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
350 | }
351 | }
[66/71] Compiling Cobalt AuthorizationCodeRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:29:47: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:102:74: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
103 | var parameters: Parameters = [:]
104 | var grantType = grantType
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:141:136: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:204:82: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:257:111: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
255 | }
256 |
257 | func requestTokenFromAuthorizationCode(initialRequest request: AuthorizationCodeRequest, code: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
258 | var parameters = [
259 | "redirect_uri": request.redirectUri,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:322:64: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:348:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
350 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:347:11: error: 'AnyPublisher' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:93:16: error: 'Just' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
:
91 | }
92 |
93 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:93:30: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
:
91 | }
92 |
93 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:93:67: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
:
91 | }
92 |
93 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
94 | }
95 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:116:24: error: 'Just' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
114 | }
115 | request.useHeaders["Authorization"] = "Bearer " + accessToken
116 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:116:38: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
114 | }
115 | request.useHeaders["Authorization"] = "Bearer " + accessToken
116 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:116:75: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
114 | }
115 | request.useHeaders["Authorization"] = "Bearer " + accessToken
116 | return Just(request).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
117 | }
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:133:14: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
131 |
132 | return sendOAuthRequest(initialRequest: request, grantType: grantType, parameters: parameters)
133 | .flatMap { [weak self] _ -> AnyPublisher<CobaltRequest, CobaltError> in
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
134 | guard let self = self else {
135 | return AnyPublisher<CobaltRequest, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:133:41: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
131 |
132 | return sendOAuthRequest(initialRequest: request, grantType: grantType, parameters: parameters)
133 | .flatMap { [weak self] _ -> AnyPublisher<CobaltRequest, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
134 | guard let self = self else {
135 | return AnyPublisher<CobaltRequest, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:135:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
133 | .flatMap { [weak self] _ -> AnyPublisher<CobaltRequest, CobaltError> in
134 | guard let self = self else {
135 | return AnyPublisher<CobaltRequest, CobaltError>.never()
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | }
137 | return self._authorizeOAuth(request: request, grantType: grantType)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:138:15: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
103 | var parameters: Parameters = [:]
:
136 | }
137 | return self._authorizeOAuth(request: request, grantType: grantType)
138 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
139 | }
140 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:173:40: error: 'tryMap' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
171 | }
172 |
173 | return client.request(request).tryMap { [weak self, client] response -> Void in
| |- error: 'tryMap' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
174 | let accessToken = try response.map(to: AccessToken.self)
175 | accessToken.host = (request.host ?? client?.config.host) ?? ""
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:180:13: error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
178 |
179 | client?.logger?.debug("Store access-token: \(optionalDescription(accessToken))")
180 | client?.authorizationGrantType = accessToken.grantType
| |- error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
181 | self?.isAuthenticating = false
182 | return ()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:183:11: error: 'tryCatch' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
181 | self?.isAuthenticating = false
182 | return ()
183 | }.tryCatch { [weak self, client] error -> AnyPublisher<Void, CobaltError> in
| |- error: 'tryCatch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
184 | defer {
185 | self?.isAuthenticating = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:183:51: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
181 | self?.isAuthenticating = false
182 | return ()
183 | }.tryCatch { [weak self, client] error -> AnyPublisher<Void, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
184 | defer {
185 | self?.isAuthenticating = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:197:11: error: 'mapError' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
195 |
196 | throw CobaltError.refreshTokenInvalidated
197 | }.mapError { error in
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
198 | return CobaltError(from: error).set(request: request)
199 | }.eraseToAnyPublisher()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:199:11: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
:
197 | }.mapError { error in
198 | return CobaltError(from: error).set(request: request)
199 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
200 | }
201 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:205:16: error: 'Deferred' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
| |- error: 'Deferred' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
206 | Future { promise in
207 | guard let strongSelf = self else {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:206:13: error: 'Future' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
| |- error: 'Future' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
207 | guard let strongSelf = self else {
208 | promise(.failure(CobaltError.unknown()))
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:254:11: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
:
252 |
253 | }
254 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
255 | }
256 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:316:9: error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
305 | /// - Returns: `Void`
306 | ///
307 | func handleManualOAuthRequest(grantType: OAuthenticationGrantType,
| `- note: add @available attribute to enclosing instance method
308 | accessToken: String,
309 | refreshToken: String,
:
314 |
315 | client.logger?.debug("Store access-token: \(optionalDescription(accessToken))")
316 | client.authorizationGrantType = grantType
| |- error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
317 | }
318 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:343:16: error: 'Fail' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
:
341 | return client.request(request)
342 | }
343 | return Fail(error: CobaltError(from: error)).eraseToAnyPublisher()
| |- error: 'Fail' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
344 | }
345 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:343:54: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
:
341 | return client.request(request)
342 | }
343 | return Fail(error: CobaltError(from: error)).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
344 | }
345 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:349:16: error: 'Empty' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
| |- error: 'Empty' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
350 | }
351 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:349:102: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
350 | }
351 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[67/71] Compiling Cobalt AccessToken.swift
[68/71] Compiling Cobalt Authentication.swift
[69/71] Emitting module Cobalt
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:29:47: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
27 | ///
28 | /// - Returns: `AnyPublisher<CobaltRequest, CobaltError>`
29 | func authorize(request: CobaltRequest) -> AnyPublisher<CobaltRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
30 | // Define headers
31 | if let headers = request.headers {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:102:74: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
99 | /// 2. If the user has an expired `password` access-token, refresh it
100 | /// 3. If you need a `client_credentials` grantType and the access-token is expired. Create a new one
101 | private func _authorizeOAuth(request: CobaltRequest,
| `- note: add @available attribute to enclosing instance method
102 | grantType: OAuthenticationGrantType) -> AnyPublisher<CobaltRequest, CobaltError> {
| `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
103 | var parameters: Parameters = [:]
104 | var grantType = grantType
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:141:136: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
139 | }
140 |
141 | func sendOAuthRequest(initialRequest: CobaltRequest? = nil, grantType: OAuthenticationGrantType, parameters: Parameters? = nil) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
142 | if isAuthenticating && initialRequest?.requiresOAuthentication == true {
143 | client.logger?.trace("Already authenticating, stopping the concurrent request")
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:204:82: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
202 | /// Create an authorization code request to request an access token
203 | /// - Returns: `AnyPublisher<AuthorizationCodeRequest, CobaltError>`
204 | func createAuthorizationCodeRequest(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
205 | return Deferred { [weak self] in
206 | Future { promise in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:257:111: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
255 | }
256 |
257 | func requestTokenFromAuthorizationCode(initialRequest request: AuthorizationCodeRequest, code: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
258 | var parameters = [
259 | "redirect_uri": request.redirectUri,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:322:64: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import DebugMasking
14 |
15 | class AuthenticationProvider {
| `- note: add @available attribute to enclosing class
16 | private weak var client: CobaltClient!
17 | private(set) var isAuthenticating = false
:
320 | // --------------------------------------------------------
321 |
322 | func recover(from error: Error, request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
323 | // If we receive an 'invalid_grant' error and we tried to do a refresh_token authentication
324 | // The access-token and underlying refresh-token is invalid
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:348:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing static method
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
350 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Authentication/AuthenticationProvider.swift:347:11: error: 'AnyPublisher' is only available in macOS 10.15 or newer
345 | }
346 |
347 | extension AnyPublisher {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing extension
348 | static func never() -> AnyPublisher<Output, Failure> {
349 | return Empty(completeImmediately: false, outputType: Output.self, failureType: Failure.self).eraseToAnyPublisher()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/ClientService.swift:17:44: error: 'AnyPublisher' is only available in macOS 10.15 or newer
11 | import Combine
12 |
13 | public final class ClientService: NSObject {
| `- note: add @available attribute to enclosing class
14 | public internal(set) var logger: Logger?
15 | public internal(set) var currentRequest: CobaltRequest?
16 | public var response: CobaltResponse?
17 | var stubbedPublishers: [CobaltRequest: AnyPublisher<CobaltResponse, CobaltError>] = [:]
| `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
18 |
19 | override public init() {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/ClientService.swift:29:72: error: 'AnyPublisher' is only available in macOS 10.15 or newer
11 | import Combine
12 |
13 | public final class ClientService: NSObject {
| `- note: add @available attribute to enclosing class
14 | public internal(set) var logger: Logger?
15 | public internal(set) var currentRequest: CobaltRequest?
:
27 | }
28 |
29 | public func addStubbedPublisher(request: CobaltRequest, publisher: AnyPublisher<CobaltResponse, CobaltError>) {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
30 | stubbedPublishers[request] = publisher
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:34:6: error: 'Published' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
32 | fileprivate lazy var queue = RequestQueue(client: self)
33 |
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
| `- error: 'Published' is only available in macOS 10.15 or newer
35 |
36 | var cancellables = Set<AnyCancellable>()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:36:28: error: 'AnyCancellable' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
35 |
36 | var cancellables = Set<AnyCancellable>()
| `- error: 'AnyCancellable' is only available in macOS 10.15 or newer
37 |
38 | public var accessToken: AccessToken? {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:73:52: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:167:56: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:247:136: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:351:60: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
349 | // --------------------------------------------------------
350 |
351 | open func login(username: String, password: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
352 | let parameters = [
353 | "username": username,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:360:79: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
358 | }
359 |
360 | open func startAuthorizationFlow(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
361 | return authProvider.createAuthorizationCodeRequest(scope: scope, redirectUri: redirectUri)
362 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:364:116: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
362 | }
363 |
364 | open func requestTokenFromAuthorizationCode(initialRequest request: AuthorizationCodeRequest, code: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
365 | return authProvider.requestTokenFromAuthorizationCode(initialRequest: request, code: code)
366 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:14:14: warning: non-final class 'CobaltError' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | import Alamofire
13 |
14 | public class CobaltError: Error {
| `- warning: non-final class 'CobaltError' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
15 |
16 | private(set) public var code: Int = 0
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:16:29: warning: stored property 'code' of 'Sendable'-conforming class 'CobaltError' is mutable; this is an error in the Swift 6 language mode
14 | public class CobaltError: Error {
15 |
16 | private(set) public var code: Int = 0
| `- warning: stored property 'code' of 'Sendable'-conforming class 'CobaltError' is mutable; this is an error in the Swift 6 language mode
17 | private(set) public var response: CobaltResponse?
18 | private(set) public var message: String?
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltError.swift:165:48: error: 'AnyPublisher' is only available in macOS 10.15 or newer
162 | }
163 |
164 | extension CobaltError {
| `- note: add @available attribute to enclosing extension
165 | func asPublisher<T>(outputType: T.Type) -> AnyPublisher<T, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
166 | return Fail<T, CobaltError>(error: self).eraseToAnyPublisher()
167 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/RequestQueue.swift:15:39: error: 'PassthroughSubject' is only available in macOS 10.15 or newer
10 | import Combine
11 |
12 | class RequestQueue {
| `- note: add @available attribute to enclosing class
13 | private weak var apiClient: CobaltClient!
14 | private(set) var requests: [CobaltRequest] = []
15 | private var _map: [CobaltRequest: PassthroughSubject<CobaltResponse, CobaltError>] = [:]
| `- error: 'PassthroughSubject' is only available in macOS 10.15 or newer
16 |
17 | var count: Int {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/RequestQueue.swift:57:50: error: 'AnyPublisher' is only available in macOS 10.15 or newer
10 | import Combine
11 |
12 | class RequestQueue {
| `- note: add @available attribute to enclosing class
13 | private weak var apiClient: CobaltClient!
14 | private(set) var requests: [CobaltRequest] = []
:
55 | }
56 |
57 | func publisher(of request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError>? {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
58 | return _map[request]?.eraseToAnyPublisher()
59 | }
[70/71] Compiling Cobalt ClientService.swift
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/ClientService.swift:17:44: error: 'AnyPublisher' is only available in macOS 10.15 or newer
11 | import Combine
12 |
13 | public final class ClientService: NSObject {
| `- note: add @available attribute to enclosing class
14 | public internal(set) var logger: Logger?
15 | public internal(set) var currentRequest: CobaltRequest?
16 | public var response: CobaltResponse?
17 | var stubbedPublishers: [CobaltRequest: AnyPublisher<CobaltResponse, CobaltError>] = [:]
| `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
18 |
19 | override public init() {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/ClientService.swift:29:72: error: 'AnyPublisher' is only available in macOS 10.15 or newer
11 | import Combine
12 |
13 | public final class ClientService: NSObject {
| `- note: add @available attribute to enclosing class
14 | public internal(set) var logger: Logger?
15 | public internal(set) var currentRequest: CobaltRequest?
:
27 | }
28 |
29 | public func addStubbedPublisher(request: CobaltRequest, publisher: AnyPublisher<CobaltResponse, CobaltError>) {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
30 | stubbedPublishers[request] = publisher
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:34:6: error: 'Published' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
32 | fileprivate lazy var queue = RequestQueue(client: self)
33 |
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
| `- error: 'Published' is only available in macOS 10.15 or newer
35 |
36 | var cancellables = Set<AnyCancellable>()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:36:28: error: 'AnyCancellable' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
35 |
36 | var cancellables = Set<AnyCancellable>()
| `- error: 'AnyCancellable' is only available in macOS 10.15 or newer
37 |
38 | public var accessToken: AccessToken? {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:73:52: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:167:56: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:247:136: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:351:60: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
349 | // --------------------------------------------------------
350 |
351 | open func login(username: String, password: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
352 | let parameters = [
353 | "username": username,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:360:79: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
358 | }
359 |
360 | open func startAuthorizationFlow(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
361 | return authProvider.createAuthorizationCodeRequest(scope: scope, redirectUri: redirectUri)
362 | }
<unknown>:0: error: cannot convert value of type 'any KeyPath<CobaltClient, OAuthenticationGrantType?> & Sendable' to expected argument type 'ReferenceWritableKeyPath<CobaltClient, OAuthenticationGrantType?>'
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:364:116: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
362 | }
363 |
364 | open func requestTokenFromAuthorizationCode(initialRequest request: AuthorizationCodeRequest, code: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
365 | return authProvider.requestTokenFromAuthorizationCode(initialRequest: request, code: code)
366 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:111:16: error: 'Just' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
109 | // 1. We (optionally) (pre-)authorize the request
110 |
111 | return Just(request)
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .setFailureType(to: CobaltError.self)
113 | .subscribe(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:112:14: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
110 |
111 | return Just(request)
112 | .setFailureType(to: CobaltError.self)
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .subscribe(on: DispatchQueue.main)
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:113:14: error: 'subscribe(on:options:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
111 | return Just(request)
112 | .setFailureType(to: CobaltError.self)
113 | .subscribe(on: DispatchQueue.main)
| |- error: 'subscribe(on:options:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
115 | .prefix(1)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:114:14: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
112 | .setFailureType(to: CobaltError.self)
113 | .subscribe(on: DispatchQueue.main)
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
115 | .prefix(1)
116 | // 2. We actually send the request with Alamofire
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:115:14: error: 'prefix' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
113 | .subscribe(on: DispatchQueue.main)
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
115 | .prefix(1)
| |- error: 'prefix' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
116 | // 2. We actually send the request with Alamofire
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:117:14: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
115 | .prefix(1)
116 | // 2. We actually send the request with Alamofire
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
118 | guard let strongSelf = self else {
119 | return AnyPublisher<CobaltResponse, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:117:50: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
115 | .prefix(1)
116 | // 2. We actually send the request with Alamofire
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
118 | guard let strongSelf = self else {
119 | return AnyPublisher<CobaltResponse, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:119:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
118 | guard let strongSelf = self else {
119 | return AnyPublisher<CobaltResponse, CobaltError>.never()
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 | }
121 | return strongSelf._request(newRequest)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:122:22: error: 'tryMap' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
120 | }
121 | return strongSelf._request(newRequest)
122 | .tryMap { [weak self] response -> any CobaltResponse in
| |- error: 'tryMap' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
123 | return (try self?.tryMap(newRequest, response: response)) ?? response
124 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:125:22: error: 'mapError' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
123 | return (try self?.tryMap(newRequest, response: response)) ?? response
124 | }
125 | .mapError { ($0 as? CobaltError) ?? CobaltError(from: $0) }
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
126 | .eraseToAnyPublisher()
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:126:22: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
124 | }
125 | .mapError { ($0 as? CobaltError) ?? CobaltError(from: $0) }
126 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
128 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:129:14: error: 'catch' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
128 | }
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'catch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:129:64: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
128 | }
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:131:22: error: 'tryCatch' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'tryCatch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | if request.requiresOAuthentication {
133 | self?.isAuthRequesting = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:131:46: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | if request.requiresOAuthentication {
133 | self?.isAuthRequesting = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:138:22: error: 'mapError' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
136 | throw authError
137 | }
138 | .mapError { CobaltError(from: $0) }
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
139 | .eraseToAnyPublisher()
140 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:139:22: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
137 | }
138 | .mapError { CobaltError(from: $0) }
139 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
140 |
141 | // 4. If any other requests are queued, fire up the next one
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:142:15: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
140 |
141 | // 4. If any other requests are queued, fire up the next one
142 | }.flatMap { [queue, weak self] response -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
143 | // When a request is finished, no matter if its succesful or not
144 | // We try to clear th queue
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:142:56: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
140 |
141 | // 4. If any other requests are queued, fire up the next one
142 | }.flatMap { [queue, weak self] response -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
143 | // When a request is finished, no matter if its succesful or not
144 | // We try to clear th queue
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:149:24: error: 'Just' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
147 | queue.next()
148 | }
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
150 | }
151 | .receive(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:149:39: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
147 | queue.next()
148 | }
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
150 | }
151 | .receive(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:149:76: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
147 | queue.next()
148 | }
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
150 | }
151 | .receive(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:151:14: error: 'receive(on:options:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
150 | }
151 | .receive(on: DispatchQueue.main)
| |- error: 'receive(on:options:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
152 | .eraseToAnyPublisher()
153 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:152:14: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
150 | }
151 | .receive(on: DispatchQueue.main)
152 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
153 | }
154 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:214:20: error: 'Just' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
212 | }
213 |
214 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
215 | }
216 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:214:35: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
212 | }
213 |
214 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
215 | }
216 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:214:72: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
212 | }
213 |
214 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
215 | }
216 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:217:16: error: 'Deferred' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
215 | }
216 |
217 | return Deferred { [weak self, session] in
| |- error: 'Deferred' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
218 | Future { promise in
219 | session.request(request.generateURLRequest())
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:218:13: error: 'Future' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
216 |
217 | return Deferred { [weak self, session] in
218 | Future { promise in
| |- error: 'Future' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
219 | session.request(request.generateURLRequest())
220 | .validate()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:244:11: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
242 |
243 | }
244 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
245 | }
246 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:255:14: error: 'tryCatch' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
253 | }
254 | return publisher
255 | .tryCatch { [weak self] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'tryCatch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
256 | switch self?.handleResponse(
257 | request: request,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:255:46: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
253 | }
254 | return publisher
255 | .tryCatch { [weak self] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
256 | switch self?.handleResponse(
257 | request: request,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:270:15: error: 'tryMap' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
268 | throw error
269 | }
270 | }.tryMap { [weak self] response -> CobaltResponse in
| |- error: 'tryMap' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
271 | switch self?.handleResponse(
272 | request: request,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:288:14: error: 'map' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
286 | }
287 | }
288 | .map { response in
| |- error: 'map' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
289 | print("~> \(response)")
290 | return response
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:292:14: error: 'mapError' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
290 | return response
291 | }
292 | .mapError { CobaltError(from: $0) }
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
293 | .eraseToAnyPublisher()
294 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:293:14: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
291 | }
292 | .mapError { CobaltError(from: $0) }
293 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
294 | }
295 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:390:9: error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
387 | }
388 |
389 | public func clearAccessToken(forHost host: String? = nil) {
| `- note: add @available attribute to enclosing instance method
390 | authorizationGrantType = nil
| |- error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
391 | guard let host = (host ?? config.host) else {
392 | fatalError("No host given, nor a valid host set in the Cobalt.Config")
[71/71] Compiling Cobalt CobaltClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/ClientService.swift:17:44: error: 'AnyPublisher' is only available in macOS 10.15 or newer
11 | import Combine
12 |
13 | public final class ClientService: NSObject {
| `- note: add @available attribute to enclosing class
14 | public internal(set) var logger: Logger?
15 | public internal(set) var currentRequest: CobaltRequest?
16 | public var response: CobaltResponse?
17 | var stubbedPublishers: [CobaltRequest: AnyPublisher<CobaltResponse, CobaltError>] = [:]
| `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
18 |
19 | override public init() {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/ClientService.swift:29:72: error: 'AnyPublisher' is only available in macOS 10.15 or newer
11 | import Combine
12 |
13 | public final class ClientService: NSObject {
| `- note: add @available attribute to enclosing class
14 | public internal(set) var logger: Logger?
15 | public internal(set) var currentRequest: CobaltRequest?
:
27 | }
28 |
29 | public func addStubbedPublisher(request: CobaltRequest, publisher: AnyPublisher<CobaltResponse, CobaltError>) {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
30 | stubbedPublishers[request] = publisher
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:34:6: error: 'Published' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
32 | fileprivate lazy var queue = RequestQueue(client: self)
33 |
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
| `- error: 'Published' is only available in macOS 10.15 or newer
35 |
36 | var cancellables = Set<AnyCancellable>()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:36:28: error: 'AnyCancellable' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
34 | @Published public var authorizationGrantType: OAuthenticationGrantType?
35 |
36 | var cancellables = Set<AnyCancellable>()
| `- error: 'AnyCancellable' is only available in macOS 10.15 or newer
37 |
38 | public var accessToken: AccessToken? {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:73:52: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:167:56: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:247:136: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:351:60: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
349 | // --------------------------------------------------------
350 |
351 | open func login(username: String, password: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
352 | let parameters = [
353 | "username": username,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:360:79: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
358 | }
359 |
360 | open func startAuthorizationFlow(scope: [String], redirectUri: String) -> AnyPublisher<AuthorizationCodeRequest, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
361 | return authProvider.createAuthorizationCodeRequest(scope: scope, redirectUri: redirectUri)
362 | }
<unknown>:0: error: cannot convert value of type 'any KeyPath<CobaltClient, OAuthenticationGrantType?> & Sendable' to expected argument type 'ReferenceWritableKeyPath<CobaltClient, OAuthenticationGrantType?>'
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:364:116: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
362 | }
363 |
364 | open func requestTokenFromAuthorizationCode(initialRequest request: AuthorizationCodeRequest, code: String) -> AnyPublisher<Void, CobaltError> {
| | `- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing instance method
365 | return authProvider.requestTokenFromAuthorizationCode(initialRequest: request, code: code)
366 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:111:16: error: 'Just' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
109 | // 1. We (optionally) (pre-)authorize the request
110 |
111 | return Just(request)
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .setFailureType(to: CobaltError.self)
113 | .subscribe(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:112:14: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
110 |
111 | return Just(request)
112 | .setFailureType(to: CobaltError.self)
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .subscribe(on: DispatchQueue.main)
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:113:14: error: 'subscribe(on:options:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
111 | return Just(request)
112 | .setFailureType(to: CobaltError.self)
113 | .subscribe(on: DispatchQueue.main)
| |- error: 'subscribe(on:options:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
115 | .prefix(1)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:114:14: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
112 | .setFailureType(to: CobaltError.self)
113 | .subscribe(on: DispatchQueue.main)
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
115 | .prefix(1)
116 | // 2. We actually send the request with Alamofire
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:115:14: error: 'prefix' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
113 | .subscribe(on: DispatchQueue.main)
114 | .flatMap { [authProvider] aRequest in authProvider.authorize(request: aRequest) }
115 | .prefix(1)
| |- error: 'prefix' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
116 | // 2. We actually send the request with Alamofire
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:117:14: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
115 | .prefix(1)
116 | // 2. We actually send the request with Alamofire
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
118 | guard let strongSelf = self else {
119 | return AnyPublisher<CobaltResponse, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:117:50: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
115 | .prefix(1)
116 | // 2. We actually send the request with Alamofire
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
118 | guard let strongSelf = self else {
119 | return AnyPublisher<CobaltResponse, CobaltError>.never()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:119:28: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
117 | .flatMap { [weak self] newRequest -> AnyPublisher<CobaltResponse, CobaltError> in
118 | guard let strongSelf = self else {
119 | return AnyPublisher<CobaltResponse, CobaltError>.never()
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
120 | }
121 | return strongSelf._request(newRequest)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:122:22: error: 'tryMap' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
120 | }
121 | return strongSelf._request(newRequest)
122 | .tryMap { [weak self] response -> any CobaltResponse in
| |- error: 'tryMap' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
123 | return (try self?.tryMap(newRequest, response: response)) ?? response
124 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:125:22: error: 'mapError' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
123 | return (try self?.tryMap(newRequest, response: response)) ?? response
124 | }
125 | .mapError { ($0 as? CobaltError) ?? CobaltError(from: $0) }
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
126 | .eraseToAnyPublisher()
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:126:22: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
124 | }
125 | .mapError { ($0 as? CobaltError) ?? CobaltError(from: $0) }
126 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
128 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:129:14: error: 'catch' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
128 | }
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'catch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:129:64: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
127 | // 3. If for some reason an error occurs, we check with the auth-provider if we need to retry
128 | }
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:131:22: error: 'tryCatch' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'tryCatch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | if request.requiresOAuthentication {
133 | self?.isAuthRequesting = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:131:46: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
129 | .catch { [queue, weak self, authProvider] error -> AnyPublisher<CobaltResponse, CobaltError> in
130 | return authProvider.recover(from: error, request: request)
131 | .tryCatch { authError -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | if request.requiresOAuthentication {
133 | self?.isAuthRequesting = false
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:138:22: error: 'mapError' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
136 | throw authError
137 | }
138 | .mapError { CobaltError(from: $0) }
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
139 | .eraseToAnyPublisher()
140 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:139:22: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
137 | }
138 | .mapError { CobaltError(from: $0) }
139 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
140 |
141 | // 4. If any other requests are queued, fire up the next one
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:142:15: error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
140 |
141 | // 4. If any other requests are queued, fire up the next one
142 | }.flatMap { [queue, weak self] response -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'flatMap(maxPublishers:_:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
143 | // When a request is finished, no matter if its succesful or not
144 | // We try to clear th queue
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:142:56: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
140 |
141 | // 4. If any other requests are queued, fire up the next one
142 | }.flatMap { [queue, weak self] response -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
143 | // When a request is finished, no matter if its succesful or not
144 | // We try to clear th queue
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:149:24: error: 'Just' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
147 | queue.next()
148 | }
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
150 | }
151 | .receive(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:149:39: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
147 | queue.next()
148 | }
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
150 | }
151 | .receive(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:149:76: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
147 | queue.next()
148 | }
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
150 | }
151 | .receive(on: DispatchQueue.main)
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:151:14: error: 'receive(on:options:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
149 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
150 | }
151 | .receive(on: DispatchQueue.main)
| |- error: 'receive(on:options:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
152 | .eraseToAnyPublisher()
153 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:152:14: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
71 | ///
72 | /// - Returns: `AnyPublisher<CobaltResponse, CobaltError>`
73 | open func request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
74 | // Strip slashes to form a valid urlString
75 | guard let host = (request.host ?? config.host) else {
:
150 | }
151 | .receive(on: DispatchQueue.main)
152 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
153 | }
154 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:214:20: error: 'Just' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
212 | }
213 |
214 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'Just' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
215 | }
216 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:214:35: error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
212 | }
213 |
214 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'setFailureType(to:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
215 | }
216 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:214:72: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
212 | }
213 |
214 | return Just(response).setFailureType(to: CobaltError.self).eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
215 | }
216 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:217:16: error: 'Deferred' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
215 | }
216 |
217 | return Deferred { [weak self, session] in
| |- error: 'Deferred' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
218 | Future { promise in
219 | session.request(request.generateURLRequest())
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:218:13: error: 'Future' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
216 |
217 | return Deferred { [weak self, session] in
218 | Future { promise in
| |- error: 'Future' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
219 | session.request(request.generateURLRequest())
220 | .validate()
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:244:11: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
165 | }
166 |
167 | private func _request(_ request: CobaltRequest) -> AnyPublisher<CobaltResponse, CobaltError> {
| `- note: add @available attribute to enclosing instance method
168 | let useRequestID = requestID
169 | requestID += 1
:
242 |
243 | }
244 | }.eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
245 | }
246 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:255:14: error: 'tryCatch' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
253 | }
254 | return publisher
255 | .tryCatch { [weak self] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'tryCatch' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
256 | switch self?.handleResponse(
257 | request: request,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:255:46: error: 'AnyPublisher' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
253 | }
254 | return publisher
255 | .tryCatch { [weak self] error -> AnyPublisher<CobaltResponse, CobaltError> in
| |- error: 'AnyPublisher' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
256 | switch self?.handleResponse(
257 | request: request,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:270:15: error: 'tryMap' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
268 | throw error
269 | }
270 | }.tryMap { [weak self] response -> CobaltResponse in
| |- error: 'tryMap' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
271 | switch self?.handleResponse(
272 | request: request,
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:288:14: error: 'map' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
286 | }
287 | }
288 | .map { response in
| |- error: 'map' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
289 | print("~> \(response)")
290 | return response
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:292:14: error: 'mapError' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
290 | return response
291 | }
292 | .mapError { CobaltError(from: $0) }
| |- error: 'mapError' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
293 | .eraseToAnyPublisher()
294 | }
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:293:14: error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
245 | }
246 |
247 | private func stub(request: CobaltRequest, requestID useRequestID: Int, ignoreLoggingRequest: Bool, ignoreLoggingResponse: Bool) -> AnyPublisher<CobaltResponse, CobaltError>? {
| `- note: add @available attribute to enclosing instance method
248 | defer {
249 | service.stubbedPublishers.removeValue(forKey: request)
:
291 | }
292 | .mapError { CobaltError(from: $0) }
293 | .eraseToAnyPublisher()
| |- error: 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
294 | }
295 |
/Users/admin/builder/spi-builder-workspace/Sources/Core/Base/CobaltClient.swift:390:9: error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
13 | import Combine
14 |
15 | open class CobaltClient {
| `- note: add @available attribute to enclosing class
16 |
17 | // MARK: - Variables
:
387 | }
388 |
389 | public func clearAccessToken(forHost host: String? = nil) {
| `- note: add @available attribute to enclosing instance method
390 | authorizationGrantType = nil
| |- error: setter for 'authorizationGrantType' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
391 | guard let host = (host ?? config.host) else {
392 | fatalError("No host given, nor a valid host set in the Cobalt.Config")
BUILD FAILURE 6.0 macosSpm