Build Information
Failed to build FlagsmithClient, reference 3.8.1 (56e62d
), with Swift 6.1 for Wasm on 29 May 2025 23:23:31 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
Build Log
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:104: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:95:61: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | {
97 | serialAccessQueue.sync {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:46: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:117:62: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | {
119 | completionHandler(.allow)
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:82: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:200:58: error: cannot find type 'URLRequest' in scope
198 | }
199 |
200 | private func updateLastUpdatedFromRequest(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
201 | // Extract the lastUpdatedAt from the updatedAt header
202 | if let lastUpdatedAt = request.allHTTPHeaderFields?["x-flagsmith-document-updated-at"] {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/CachedURLResponse.swift:13:1: error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
11 | #endif
12 |
13 | extension CachedURLResponse {
| `- error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
14 | func response(withExpirationDuration duration: Int) -> CachedURLResponse {
15 | var cachedResponse = self
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:16:35: error: cannot find type 'URLSessionDataDelegate' in scope
14 | /// It manages the connection to the SSE endpoint, processes incoming events,
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
17 | private var _session: URLSession!
18 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:17:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 | private var session: URLSession {
19 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:18:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
18 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | get {
20 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:29:28: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | }
28 |
29 | private var _dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | private var dataTask: URLSessionDataTask? {
31 | get {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:30:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |
29 | private var _dataTask: URLSessionDataTask?
30 | private var dataTask: URLSessionDataTask? {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | get {
32 | propertiesSerialAccessQueue.sync { _dataTask }
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:37: error: cannot find 'DispatchQueue' in scope
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:97: error: cannot infer contextual base in reference to member 'default'
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:39: error: cannot find 'DispatchQueue' in scope
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:100: error: cannot infer contextual base in reference to member 'default'
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
[16/26] Compiling FlagsmithClient Traits.swift
[17/26] Compiling FlagsmithClient TypedValue.swift
[18/26] Compiling FlagsmithClient ReconnectionDelay.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:98:23: error: cannot find 'URLRequest' in scope
96 | }
97 |
98 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
99 | request.httpMethod = method.rawValue
100 | if let body = try body(using: encoder) {
[19/26] Compiling FlagsmithClient Router.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:98:23: error: cannot find 'URLRequest' in scope
96 | }
97 |
98 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
99 | request.httpMethod = method.rawValue
100 | if let body = try body(using: encoder) {
[20/26] Compiling FlagsmithClient SSEManager.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:16:35: error: cannot find type 'URLSessionDataDelegate' in scope
14 | /// It manages the connection to the SSE endpoint, processes incoming events,
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
17 | private var _session: URLSession!
18 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:17:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 | private var session: URLSession {
19 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:18:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
18 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | get {
20 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:29:28: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | }
28 |
29 | private var _dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | private var dataTask: URLSessionDataTask? {
31 | get {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:30:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |
29 | private var _dataTask: URLSessionDataTask?
30 | private var dataTask: URLSessionDataTask? {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | get {
32 | propertiesSerialAccessQueue.sync { _dataTask }
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:37: error: cannot find 'DispatchQueue' in scope
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:97: error: cannot infer contextual base in reference to member 'default'
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:39: error: cannot find 'DispatchQueue' in scope
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:100: error: cannot infer contextual base in reference to member 'default'
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:23:54: error: cannot infer contextual base in reference to member 'barrier'
21 | }
22 | set {
23 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
24 | _session = newValue
25 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:35:54: error: cannot infer contextual base in reference to member 'barrier'
33 | }
34 | set {
35 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
36 | _dataTask = newValue
37 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:78:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
76 | override init() {
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
80 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:91: error: cannot find 'OperationQueue' in scope
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: cannot find 'OperationQueue' in scope
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:16: error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:24: error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:154:23: error: cannot find 'URLRequest' in scope
152 | }
153 |
154 | var request = URLRequest(url: completeEventSourceUrl)
| `- error: cannot find 'URLRequest' in scope
155 | request.setValue("text/event-stream, application/json; charset=utf-8", forHTTPHeaderField: "Accept")
156 | request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:160:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
158 |
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
161 | dataTask?.resume()
162 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:161:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
161 | dataTask?.resume()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
162 | }
163 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:165:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
163 |
164 | func stop() {
165 | dataTask?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
166 | completionHandler = nil
167 | }
[21/26] Compiling FlagsmithClient Trait.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:16:35: error: cannot find type 'URLSessionDataDelegate' in scope
14 | /// It manages the connection to the SSE endpoint, processes incoming events,
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
17 | private var _session: URLSession!
18 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:17:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 | private var session: URLSession {
19 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:18:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
18 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | get {
20 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:29:28: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | }
28 |
29 | private var _dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | private var dataTask: URLSessionDataTask? {
31 | get {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:30:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |
29 | private var _dataTask: URLSessionDataTask?
30 | private var dataTask: URLSessionDataTask? {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | get {
32 | propertiesSerialAccessQueue.sync { _dataTask }
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:37: error: cannot find 'DispatchQueue' in scope
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:97: error: cannot infer contextual base in reference to member 'default'
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:39: error: cannot find 'DispatchQueue' in scope
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:100: error: cannot infer contextual base in reference to member 'default'
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:23:54: error: cannot infer contextual base in reference to member 'barrier'
21 | }
22 | set {
23 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
24 | _session = newValue
25 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:35:54: error: cannot infer contextual base in reference to member 'barrier'
33 | }
34 | set {
35 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
36 | _dataTask = newValue
37 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:78:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
76 | override init() {
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
80 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:91: error: cannot find 'OperationQueue' in scope
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: cannot find 'OperationQueue' in scope
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:16: error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:24: error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:154:23: error: cannot find 'URLRequest' in scope
152 | }
153 |
154 | var request = URLRequest(url: completeEventSourceUrl)
| `- error: cannot find 'URLRequest' in scope
155 | request.setValue("text/event-stream, application/json; charset=utf-8", forHTTPHeaderField: "Accept")
156 | request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:160:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
158 |
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
161 | dataTask?.resume()
162 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:161:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
161 | dataTask?.resume()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
162 | }
163 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:165:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
163 |
164 | func stop() {
165 | dataTask?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
166 | completionHandler = nil
167 | }
[22/26] Compiling FlagsmithClient Flagsmith+Concurrency.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:360:35: error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
358 | if lastUpdatedAt < event.updatedAt {
359 | // Evict everything fron the cache
360 | cacheConfig.cache.removeAllCachedResponses()
| `- error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
361 |
362 | // Now we can get the new values, which we can emit to the flagUpdateFlow if used
[23/26] Compiling FlagsmithClient Flagsmith.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:360:35: error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
358 | if lastUpdatedAt < event.updatedAt {
359 | // Evict everything fron the cache
360 | cacheConfig.cache.removeAllCachedResponses()
| `- error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
361 |
362 | // Now we can get the new values, which we can emit to the flagUpdateFlow if used
[24/26] Compiling FlagsmithClient FlagsmithError.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:360:35: error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
358 | if lastUpdatedAt < event.updatedAt {
359 | // Evict everything fron the cache
360 | cacheConfig.cache.removeAllCachedResponses()
| `- error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
361 |
362 | // Now we can get the new values, which we can emit to the flagUpdateFlow if used
[25/26] Compiling FlagsmithClient UnknownTypeValue.swift
[26/26] Compiling FlagsmithClient resource_bundle_accessor.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
[1/1] Compiling plugin SwiftFormatPlugin
[2/2] Compiling plugin SwiftLintCommandPlugin
[3/3] Compiling plugin SwiftLintBuildToolPlugin
[4/4] Compiling plugin GenerateManual
Building for debugging...
[4/5] Write swift-version-24593BA9C3E375BF.txt
[6/22] Compiling FlagsmithClient Identity.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:14:35: error: cannot find type 'URLSessionDataDelegate' in scope
12 |
13 | /// Handles interaction with a **Flagsmith** api.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
15 | private var _session: URLSession!
16 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:15:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | /// Handles interaction with a **Flagsmith** api.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
15 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | private var session: URLSession {
17 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:16:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
15 | private var _session: URLSession!
16 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | get {
18 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:68:37: error: cannot find 'DispatchQueue' in scope
66 | private var tasksToCompletionHandlers: [Int: @Sendable (Result<Data, any Error>) -> Void] = [:]
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
70 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:68:94: error: cannot infer contextual base in reference to member 'default'
66 | private var tasksToCompletionHandlers: [Int: @Sendable (Result<Data, any Error>) -> Void] = [:]
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
70 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:77:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | }
76 |
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:77:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | }
76 |
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:104: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:95:61: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | {
97 | serialAccessQueue.sync {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:46: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:117:62: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | {
119 | completionHandler(.allow)
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:82: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:200:58: error: cannot find type 'URLRequest' in scope
198 | }
199 |
200 | private func updateLastUpdatedFromRequest(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
201 | // Extract the lastUpdatedAt from the updatedAt header
202 | if let lastUpdatedAt = request.allHTTPHeaderFields?["x-flagsmith-document-updated-at"] {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:21:54: error: cannot infer contextual base in reference to member 'barrier'
19 | }
20 | set {
21 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
22 | _session = newValue
23 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:73:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
71 | override init() {
72 | super.init()
73 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
74 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
75 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:74:91: error: cannot find 'OperationQueue' in scope
72 | super.init()
73 | let configuration = URLSessionConfiguration.default
74 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: cannot find 'OperationQueue' in scope
75 | }
76 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:74:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
72 | super.init()
73 | let configuration = URLSessionConfiguration.default
74 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
75 | }
76 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:82:25: error: cannot find 'DispatchQueue' in scope
80 | if let completion = tasksToCompletionHandlers[dataTask.taskIdentifier] {
81 | if let error = error {
82 | DispatchQueue.main.async { completion(.failure(FlagsmithError.unhandled(error))) }
| `- error: cannot find 'DispatchQueue' in scope
83 | } else {
84 | let data = tasksToData[dataTask.taskIdentifier] ?? Data()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:85:25: error: cannot find 'DispatchQueue' in scope
83 | } else {
84 | let data = tasksToData[dataTask.taskIdentifier] ?? Data()
85 | DispatchQueue.main.async { completion(.success(data)) }
| `- error: cannot find 'DispatchQueue' in scope
86 | }
87 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:79:36: warning: conditional cast from 'URLSessionTask' (aka 'AnyObject') to 'URLSessionDataTask' (aka 'AnyObject') always succeeds
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
| `- warning: conditional cast from 'URLSessionTask' (aka 'AnyObject') to 'URLSessionDataTask' (aka 'AnyObject') always succeeds
80 | if let completion = tasksToCompletionHandlers[dataTask.taskIdentifier] {
81 | if let error = error {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:80:72: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
80 | if let completion = tasksToCompletionHandlers[dataTask.taskIdentifier] {
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
81 | if let error = error {
82 | DispatchQueue.main.async { completion(.failure(FlagsmithError.unhandled(error))) }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:101:17: error: cannot find 'DispatchQueue' in scope
99 | if Flagsmith.shared.cacheConfig.useCache {
100 | let newResponse = proposedResponse.response(withExpirationDuration: Int(Flagsmith.shared.cacheConfig.cacheTTL))
101 | DispatchQueue.main.async { completionHandler(newResponse) }
| `- error: cannot find 'DispatchQueue' in scope
102 | } else {
103 | DispatchQueue.main.async { completionHandler(proposedResponse) }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:103:17: error: cannot find 'DispatchQueue' in scope
101 | DispatchQueue.main.async { completionHandler(newResponse) }
102 | } else {
103 | DispatchQueue.main.async { completionHandler(proposedResponse) }
| `- error: cannot find 'DispatchQueue' in scope
104 | }
105 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:100:52: error: value of type 'CachedURLResponse' (aka 'AnyObject') has no member 'response'
98 | // intercept and modify the cache settings for the response
99 | if Flagsmith.shared.cacheConfig.useCache {
100 | let newResponse = proposedResponse.response(withExpirationDuration: Int(Flagsmith.shared.cacheConfig.cacheTTL))
| `- error: value of type 'CachedURLResponse' (aka 'AnyObject') has no member 'response'
101 | DispatchQueue.main.async { completionHandler(newResponse) }
102 | } else {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:110:53: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
111 | existingData.append(data)
112 | tasksToData[dataTask.taskIdentifier] = existingData
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:119:28: error: cannot infer contextual base in reference to member 'allow'
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
119 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
120 | }
121 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:134:22: error: cannot find type 'URLRequest' in scope
132 | }
133 |
134 | var request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
135 | do {
136 | request = try router.request(baseUrl: baseURL, apiKey: apiKey)
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:143:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
141 |
142 | // set the cache policy based on Flagsmith settings
143 | request.cachePolicy = .reloadIgnoringLocalAndRemoteCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
144 | session.configuration.urlCache = Flagsmith.shared.cacheConfig.cache
145 | if Flagsmith.shared.cacheConfig.useCache {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:144:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
142 | // set the cache policy based on Flagsmith settings
143 | request.cachePolicy = .reloadIgnoringLocalAndRemoteCacheData
144 | session.configuration.urlCache = Flagsmith.shared.cacheConfig.cache
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
145 | if Flagsmith.shared.cacheConfig.useCache {
146 | request.cachePolicy = .useProtocolCachePolicy
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:146:36: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
144 | session.configuration.urlCache = Flagsmith.shared.cacheConfig.cache
145 | if Flagsmith.shared.cacheConfig.useCache {
146 | request.cachePolicy = .useProtocolCachePolicy
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
147 | if Flagsmith.shared.cacheConfig.skipAPI {
148 | request.cachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:148:40: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
146 | request.cachePolicy = .useProtocolCachePolicy
147 | if Flagsmith.shared.cacheConfig.skipAPI {
148 | request.cachePolicy = .returnCacheDataElseLoad
| `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
149 | }
150 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:154:32: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
152 | // we must use the delegate form here, not the completion handler, to be able to modify the cache
153 | serialAccessQueue.sync {
154 | let task = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
155 | tasksToCompletionHandlers[task.taskIdentifier] = completion
156 | task.resume()
[7/22] Compiling FlagsmithClient APIManager.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:14:35: error: cannot find type 'URLSessionDataDelegate' in scope
12 |
13 | /// Handles interaction with a **Flagsmith** api.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
15 | private var _session: URLSession!
16 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:15:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | /// Handles interaction with a **Flagsmith** api.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
15 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | private var session: URLSession {
17 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:16:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
15 | private var _session: URLSession!
16 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | get {
18 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:68:37: error: cannot find 'DispatchQueue' in scope
66 | private var tasksToCompletionHandlers: [Int: @Sendable (Result<Data, any Error>) -> Void] = [:]
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
70 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:68:94: error: cannot infer contextual base in reference to member 'default'
66 | private var tasksToCompletionHandlers: [Int: @Sendable (Result<Data, any Error>) -> Void] = [:]
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
70 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:77:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | }
76 |
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:77:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | }
76 |
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:104: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:95:61: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | {
97 | serialAccessQueue.sync {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:46: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:117:62: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | {
119 | completionHandler(.allow)
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:82: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:200:58: error: cannot find type 'URLRequest' in scope
198 | }
199 |
200 | private func updateLastUpdatedFromRequest(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
201 | // Extract the lastUpdatedAt from the updatedAt header
202 | if let lastUpdatedAt = request.allHTTPHeaderFields?["x-flagsmith-document-updated-at"] {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:21:54: error: cannot infer contextual base in reference to member 'barrier'
19 | }
20 | set {
21 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
22 | _session = newValue
23 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:73:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
71 | override init() {
72 | super.init()
73 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
74 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
75 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:74:91: error: cannot find 'OperationQueue' in scope
72 | super.init()
73 | let configuration = URLSessionConfiguration.default
74 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: cannot find 'OperationQueue' in scope
75 | }
76 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:74:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
72 | super.init()
73 | let configuration = URLSessionConfiguration.default
74 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
75 | }
76 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:82:25: error: cannot find 'DispatchQueue' in scope
80 | if let completion = tasksToCompletionHandlers[dataTask.taskIdentifier] {
81 | if let error = error {
82 | DispatchQueue.main.async { completion(.failure(FlagsmithError.unhandled(error))) }
| `- error: cannot find 'DispatchQueue' in scope
83 | } else {
84 | let data = tasksToData[dataTask.taskIdentifier] ?? Data()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:85:25: error: cannot find 'DispatchQueue' in scope
83 | } else {
84 | let data = tasksToData[dataTask.taskIdentifier] ?? Data()
85 | DispatchQueue.main.async { completion(.success(data)) }
| `- error: cannot find 'DispatchQueue' in scope
86 | }
87 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:79:36: warning: conditional cast from 'URLSessionTask' (aka 'AnyObject') to 'URLSessionDataTask' (aka 'AnyObject') always succeeds
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
| `- warning: conditional cast from 'URLSessionTask' (aka 'AnyObject') to 'URLSessionDataTask' (aka 'AnyObject') always succeeds
80 | if let completion = tasksToCompletionHandlers[dataTask.taskIdentifier] {
81 | if let error = error {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:80:72: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
80 | if let completion = tasksToCompletionHandlers[dataTask.taskIdentifier] {
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
81 | if let error = error {
82 | DispatchQueue.main.async { completion(.failure(FlagsmithError.unhandled(error))) }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:101:17: error: cannot find 'DispatchQueue' in scope
99 | if Flagsmith.shared.cacheConfig.useCache {
100 | let newResponse = proposedResponse.response(withExpirationDuration: Int(Flagsmith.shared.cacheConfig.cacheTTL))
101 | DispatchQueue.main.async { completionHandler(newResponse) }
| `- error: cannot find 'DispatchQueue' in scope
102 | } else {
103 | DispatchQueue.main.async { completionHandler(proposedResponse) }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:103:17: error: cannot find 'DispatchQueue' in scope
101 | DispatchQueue.main.async { completionHandler(newResponse) }
102 | } else {
103 | DispatchQueue.main.async { completionHandler(proposedResponse) }
| `- error: cannot find 'DispatchQueue' in scope
104 | }
105 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:100:52: error: value of type 'CachedURLResponse' (aka 'AnyObject') has no member 'response'
98 | // intercept and modify the cache settings for the response
99 | if Flagsmith.shared.cacheConfig.useCache {
100 | let newResponse = proposedResponse.response(withExpirationDuration: Int(Flagsmith.shared.cacheConfig.cacheTTL))
| `- error: value of type 'CachedURLResponse' (aka 'AnyObject') has no member 'response'
101 | DispatchQueue.main.async { completionHandler(newResponse) }
102 | } else {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:110:53: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskIdentifier'
111 | existingData.append(data)
112 | tasksToData[dataTask.taskIdentifier] = existingData
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:119:28: error: cannot infer contextual base in reference to member 'allow'
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
119 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
120 | }
121 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:134:22: error: cannot find type 'URLRequest' in scope
132 | }
133 |
134 | var request: URLRequest
| `- error: cannot find type 'URLRequest' in scope
135 | do {
136 | request = try router.request(baseUrl: baseURL, apiKey: apiKey)
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:143:32: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
141 |
142 | // set the cache policy based on Flagsmith settings
143 | request.cachePolicy = .reloadIgnoringLocalAndRemoteCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
144 | session.configuration.urlCache = Flagsmith.shared.cacheConfig.cache
145 | if Flagsmith.shared.cacheConfig.useCache {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:144:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
142 | // set the cache policy based on Flagsmith settings
143 | request.cachePolicy = .reloadIgnoringLocalAndRemoteCacheData
144 | session.configuration.urlCache = Flagsmith.shared.cacheConfig.cache
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
145 | if Flagsmith.shared.cacheConfig.useCache {
146 | request.cachePolicy = .useProtocolCachePolicy
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:146:36: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
144 | session.configuration.urlCache = Flagsmith.shared.cacheConfig.cache
145 | if Flagsmith.shared.cacheConfig.useCache {
146 | request.cachePolicy = .useProtocolCachePolicy
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
147 | if Flagsmith.shared.cacheConfig.skipAPI {
148 | request.cachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:148:40: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
146 | request.cachePolicy = .useProtocolCachePolicy
147 | if Flagsmith.shared.cacheConfig.skipAPI {
148 | request.cachePolicy = .returnCacheDataElseLoad
| `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
149 | }
150 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:154:32: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
152 | // we must use the delegate form here, not the completion handler, to be able to modify the cache
153 | serialAccessQueue.sync {
154 | let task = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
155 | tasksToCompletionHandlers[task.taskIdentifier] = completion
156 | task.resume()
[8/22] Compiling FlagsmithClient Flagsmith+Concurrency.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:360:35: error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
358 | if lastUpdatedAt < event.updatedAt {
359 | // Evict everything fron the cache
360 | cacheConfig.cache.removeAllCachedResponses()
| `- error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
361 |
362 | // Now we can get the new values, which we can emit to the flagUpdateFlow if used
[9/22] Compiling FlagsmithClient Flagsmith.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:360:35: error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
358 | if lastUpdatedAt < event.updatedAt {
359 | // Evict everything fron the cache
360 | cacheConfig.cache.removeAllCachedResponses()
| `- error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
361 |
362 | // Now we can get the new values, which we can emit to the flagUpdateFlow if used
[10/22] Compiling FlagsmithClient FlagsmithError.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:360:35: error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
358 | if lastUpdatedAt < event.updatedAt {
359 | // Evict everything fron the cache
360 | cacheConfig.cache.removeAllCachedResponses()
| `- error: value of type 'URLCache' (aka 'AnyObject') has no member 'removeAllCachedResponses'
361 |
362 | // Now we can get the new values, which we can emit to the flagUpdateFlow if used
[11/24] Compiling FlagsmithClient CachedURLResponse.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/CachedURLResponse.swift:13:1: error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
11 | #endif
12 |
13 | extension CachedURLResponse {
| `- error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
14 | func response(withExpirationDuration duration: Int) -> CachedURLResponse {
15 | var cachedResponse = self
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
[12/24] Compiling FlagsmithClient FlagsmithAnalytics.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/CachedURLResponse.swift:13:1: error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
11 | #endif
12 |
13 | extension CachedURLResponse {
| `- error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
14 | func response(withExpirationDuration duration: Int) -> CachedURLResponse {
15 | var cachedResponse = self
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
[13/24] Compiling FlagsmithClient Traits.swift
[14/24] Compiling FlagsmithClient TypedValue.swift
[15/24] Compiling FlagsmithClient ReconnectionDelay.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:98:23: error: cannot find 'URLRequest' in scope
96 | }
97 |
98 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
99 | request.httpMethod = method.rawValue
100 | if let body = try body(using: encoder) {
[16/24] Compiling FlagsmithClient Router.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:98:23: error: cannot find 'URLRequest' in scope
96 | }
97 |
98 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
99 | request.httpMethod = method.rawValue
100 | if let body = try body(using: encoder) {
[17/24] Compiling FlagsmithClient SSEManager.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:16:35: error: cannot find type 'URLSessionDataDelegate' in scope
14 | /// It manages the connection to the SSE endpoint, processes incoming events,
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
17 | private var _session: URLSession!
18 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:17:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 | private var session: URLSession {
19 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:18:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
18 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | get {
20 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:29:28: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | }
28 |
29 | private var _dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | private var dataTask: URLSessionDataTask? {
31 | get {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:30:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |
29 | private var _dataTask: URLSessionDataTask?
30 | private var dataTask: URLSessionDataTask? {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | get {
32 | propertiesSerialAccessQueue.sync { _dataTask }
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:37: error: cannot find 'DispatchQueue' in scope
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:97: error: cannot infer contextual base in reference to member 'default'
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:39: error: cannot find 'DispatchQueue' in scope
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:100: error: cannot infer contextual base in reference to member 'default'
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:23:54: error: cannot infer contextual base in reference to member 'barrier'
21 | }
22 | set {
23 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
24 | _session = newValue
25 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:35:54: error: cannot infer contextual base in reference to member 'barrier'
33 | }
34 | set {
35 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
36 | _dataTask = newValue
37 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:78:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
76 | override init() {
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
80 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:91: error: cannot find 'OperationQueue' in scope
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: cannot find 'OperationQueue' in scope
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:16: error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:24: error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:154:23: error: cannot find 'URLRequest' in scope
152 | }
153 |
154 | var request = URLRequest(url: completeEventSourceUrl)
| `- error: cannot find 'URLRequest' in scope
155 | request.setValue("text/event-stream, application/json; charset=utf-8", forHTTPHeaderField: "Accept")
156 | request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:160:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
158 |
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
161 | dataTask?.resume()
162 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:161:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
161 | dataTask?.resume()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
162 | }
163 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:165:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
163 |
164 | func stop() {
165 | dataTask?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
166 | completionHandler = nil
167 | }
[18/24] Compiling FlagsmithClient Trait.swift
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:16:35: error: cannot find type 'URLSessionDataDelegate' in scope
14 | /// It manages the connection to the SSE endpoint, processes incoming events,
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
17 | private var _session: URLSession!
18 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:17:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 | private var session: URLSession {
19 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:18:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
18 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | get {
20 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:29:28: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | }
28 |
29 | private var _dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | private var dataTask: URLSessionDataTask? {
31 | get {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:30:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |
29 | private var _dataTask: URLSessionDataTask?
30 | private var dataTask: URLSessionDataTask? {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | get {
32 | propertiesSerialAccessQueue.sync { _dataTask }
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:37: error: cannot find 'DispatchQueue' in scope
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:97: error: cannot infer contextual base in reference to member 'default'
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:39: error: cannot find 'DispatchQueue' in scope
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:100: error: cannot infer contextual base in reference to member 'default'
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:23:54: error: cannot infer contextual base in reference to member 'barrier'
21 | }
22 | set {
23 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
24 | _session = newValue
25 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:35:54: error: cannot infer contextual base in reference to member 'barrier'
33 | }
34 | set {
35 | propertiesSerialAccessQueue.sync(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
36 | _dataTask = newValue
37 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:78:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
76 | override init() {
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
80 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:91: error: cannot find 'OperationQueue' in scope
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: cannot find 'OperationQueue' in scope
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:79:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
77 | super.init()
78 | let configuration = URLSessionConfiguration.default
79 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: OperationQueue.main)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
80 | }
81 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:16: error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionTask' (aka 'AnyObject') to expected argument type 'any Any.Type'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:116:24: error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
115 | serialAccessQueue.sync {
116 | if task != dataTask {
| `- error: cannot convert value of type 'URLSessionDataTask?' (aka 'Optional<AnyObject>') to expected argument type '(any Any.Type)?'
117 | return
118 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:154:23: error: cannot find 'URLRequest' in scope
152 | }
153 |
154 | var request = URLRequest(url: completeEventSourceUrl)
| `- error: cannot find 'URLRequest' in scope
155 | request.setValue("text/event-stream, application/json; charset=utf-8", forHTTPHeaderField: "Accept")
156 | request.setValue("no-cache", forHTTPHeaderField: "Cache-Control")
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:160:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
158 |
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
161 | dataTask?.resume()
162 | }
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:161:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
159 | completionHandler = completion
160 | dataTask = session.dataTask(with: request)
161 | dataTask?.resume()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
162 | }
163 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:165:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
163 |
164 | func stop() {
165 | dataTask?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
166 | completionHandler = nil
167 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[19/24] Emitting module FlagsmithClient
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:35: error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: type 'URLCache' (aka 'AnyObject') has no member 'shared'
396 |
397 | /// Use cached flags as a fallback?
/host/spi-builder-workspace/FlagsmithClient/Classes/Flagsmith.swift:395:23: error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
393 | public final class CacheConfig {
394 | /// Cache to use when enabled, defaults to the shared app cache
395 | public var cache: URLCache = .shared
| `- error: 'URLCache' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
396 |
397 | /// Use cached flags as a fallback?
Foundation.URLCache:2:18: note: 'URLCache' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLCache = AnyObject
| `- note: 'URLCache' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:14:35: error: cannot find type 'URLSessionDataDelegate' in scope
12 |
13 | /// Handles interaction with a **Flagsmith** api.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
15 | private var _session: URLSession!
16 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:15:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | /// Handles interaction with a **Flagsmith** api.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
15 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | private var session: URLSession {
17 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:16:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 | final class APIManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
15 | private var _session: URLSession!
16 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | get {
18 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:68:37: error: cannot find 'DispatchQueue' in scope
66 | private var tasksToCompletionHandlers: [Int: @Sendable (Result<Data, any Error>) -> Void] = [:]
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
70 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:68:94: error: cannot infer contextual base in reference to member 'default'
66 | private var tasksToCompletionHandlers: [Int: @Sendable (Result<Data, any Error>) -> Void] = [:]
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
70 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:39: error: cannot find 'DispatchQueue' in scope
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:69:97: error: cannot infer contextual base in reference to member 'default'
67 | private var tasksToData: [Int: Data] = [:]
68 | private let serialAccessQueue = DispatchQueue(label: "flagsmithSerialAccessQueue", qos: .default)
69 | let propertiesSerialAccessQueue = DispatchQueue(label: "propertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
70 |
71 | override init() {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:77:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | }
76 |
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:77:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | }
76 |
77 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | serialAccessQueue.sync {
79 | if let dataTask = task as? URLSessionDataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:94:104: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
96 | {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:95:61: error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 |
94 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse,
95 | completionHandler: @Sendable @escaping (CachedURLResponse?) -> Void)
| `- error: 'CachedURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
96 | {
97 | serialAccessQueue.sync {
Foundation.CachedURLResponse:2:18: note: 'CachedURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias CachedURLResponse = AnyObject
| `- note: 'CachedURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:108:46: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | }
107 |
108 | func urlSession(_: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
109 | serialAccessQueue.sync {
110 | var existingData = tasksToData[dataTask.taskIdentifier] ?? Data()
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:117:62: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | {
119 | completionHandler(.allow)
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:116:82: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive _: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
118 | {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/APIManager.swift:200:58: error: cannot find type 'URLRequest' in scope
198 | }
199 |
200 | private func updateLastUpdatedFromRequest(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
201 | // Extract the lastUpdatedAt from the updatedAt header
202 | if let lastUpdatedAt = request.allHTTPHeaderFields?["x-flagsmith-document-updated-at"] {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/CachedURLResponse.swift:13:1: error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
11 | #endif
12 |
13 | extension CachedURLResponse {
| `- error: non-nominal type 'CachedURLResponse' (aka 'AnyObject') cannot be extended
14 | func response(withExpirationDuration duration: Int) -> CachedURLResponse {
15 | var cachedResponse = self
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/Router.swift:83:72: error: cannot find type 'URLRequest' in scope
81 | func request(baseUrl: URL,
82 | apiKey: String,
83 | using encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
84 | {
85 | let urlString = baseUrl.appendingPathComponent(path).absoluteString
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:16:35: error: cannot find type 'URLSessionDataDelegate' in scope
14 | /// It manages the connection to the SSE endpoint, processes incoming events,
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
17 | private var _session: URLSession!
18 | private var session: URLSession {
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:17:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// and handles reconnection logic with a backoff strategy.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 | private var session: URLSession {
19 | get {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:18:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | final class SSEManager: NSObject, URLSessionDataDelegate, @unchecked Sendable {
17 | private var _session: URLSession!
18 | private var session: URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | get {
20 | propertiesSerialAccessQueue.sync { _session }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:29:28: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | }
28 |
29 | private var _dataTask: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | private var dataTask: URLSessionDataTask? {
31 | get {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:30:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |
29 | private var _dataTask: URLSessionDataTask?
30 | private var dataTask: URLSessionDataTask? {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | get {
32 | propertiesSerialAccessQueue.sync { _dataTask }
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:37: error: cannot find 'DispatchQueue' in scope
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:72:97: error: cannot infer contextual base in reference to member 'default'
70 |
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
74 | private let reconnectionDelay = ReconnectionDelay()
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:39: error: cannot find 'DispatchQueue' in scope
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot find 'DispatchQueue' in scope
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:73:100: error: cannot infer contextual base in reference to member 'default'
71 | private var completionHandler: CompletionHandler<FlagEvent>?
72 | private let serialAccessQueue = DispatchQueue(label: "sseFlagsmithSerialAccessQueue", qos: .default)
73 | let propertiesSerialAccessQueue = DispatchQueue(label: "ssePropertiesSerialAccessQueue", qos: .default)
| `- error: cannot infer contextual base in reference to member 'default'
74 | private let reconnectionDelay = ReconnectionDelay()
75 |
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:105:48: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | // MARK: URLSessionDelegate
104 |
105 | func urlSession(_: URLSession, dataTask _: URLSessionDataTask, didReceive data: Data) {
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
106 | serialAccessQueue.sync {
107 | if let message = String(data: data, encoding: .utf8) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/FlagsmithClient/Classes/Internal/SSEManager.swift:114:42: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
112 | }
113 |
114 | func urlSession(_: URLSession, task: URLSessionTask, didCompleteWithError error: (any Error)?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
115 | serialAccessQueue.sync {
116 | if task != dataTask {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
[20/24] Compiling FlagsmithClient Feature.swift
[21/24] Compiling FlagsmithClient Flag.swift
[22/24] Compiling FlagsmithClient FlagEvent.swift
[23/24] Compiling FlagsmithClient UnknownTypeValue.swift
[24/24] Compiling FlagsmithClient resource_bundle_accessor.swift
BUILD FAILURE 6.1 wasm