The Swift Package Index logo.Swift Package Index

Build Information

Failed to build XMPPChatSwift, reference v1.0.0 (ff6f24), with Swift 6.3 for macOS (SPM) on 29 Jun 2026 04:26:29 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-26.4.0.app xcrun swift build --arch arm64

Build Log

    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
[103/108] Compiling XMPPChatCore XMPPSettings.swift
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:115:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
 82 |     /// - Parameter useEthoraJwtWordPrefix: If `true` (default), uses ``AppConfig/normalizedAppAuthorizationHeader(_:)`` (`JWT eyJ…`).
 83 |     ///   If `false`, sends only the raw three-part JWT (no leading `JWT ` / no `Bearer` added). See ``AppConfig/appAuthorizationHeader(fromPaste:useEthoraJwtWordPrefix:)``.
 84 |     public static func loginWithEmail(
    |                        `- note: add '@available' attribute to enclosing static method
 85 |         email: String,
 86 |         password: String,
    :
113 |         request.httpBody = try JSONEncoder().encode(body)
114 |
115 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
116 |
117 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:122:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
120 |
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:123:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
124 |
125 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:144:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
142 |         // Log response body
143 |         //NSlog("Full Response Data:")
144 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
145 |             // Try to pretty //print JSON
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:148:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
147 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
148 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
149 |                 //NSlog("%@", prettyString)
150 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:174:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
172 |             //print("")
173 |         //print("Full Response Data:")
174 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:177:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
177 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
178 |                 //print(prettyString)
179 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:215:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
213 |             return loginResponse
214 |         } catch {
215 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
216 |             //print("❌ AuthAPI.loginWithEmail Decode Error: \(error)")
217 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:260:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
229 |     ///   - appToken: App token for Authorization header
230 |     /// - Returns: New token and refreshToken
231 |     public static func refreshToken(
    |                        `- note: add '@available' attribute to enclosing static method
232 |         refreshToken: String,
233 |         baseURL: URL? = nil,
    :
258 |         _ = appToken // parameter kept for source compatibility; not used anymore
259 |
260 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
261 |
262 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:267:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
265 |
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
269 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:268:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:289:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
287 |         // Log response body
288 |         //NSlog("Full Response Data:")
289 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:292:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
292 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
293 |                 //NSlog("%@", prettyString)
294 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:318:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
316 |         //print("")
317 |         //print("Full Response Data:")
318 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:321:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
321 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
322 |                 //print(prettyString)
323 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:371:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
355 |     ///   - baseURL: API base URL
356 |     /// - Returns: LoginResponse with token, refreshToken, and user data
357 |     public static func loginViaJwt(
    |                        `- note: add '@available' attribute to enclosing static method
358 |         clientToken: String,
359 |         baseURL: URL? = nil
    :
369 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
370 |
371 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
372 |
373 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:406:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
404 |             return loginResponse
405 |         } catch {
406 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
407 |             //print("❌ AuthAPI.loginViaJwt Decode Error: \(error)")
408 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:437:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
420 |     ///   - appToken: App token for Authorization header
421 |     /// - Returns: Boolean indicating if email exists
422 |     public static func checkEmailExist(
    |                        `- note: add '@available' attribute to enclosing static method
423 |         email: String,
424 |         baseURL: URL? = nil,
    :
435 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
436 |
437 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
438 |
439 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:516:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
472 |     ///   - token: User token for Authorization header
473 |     /// - Returns: UploadResponse with file information
474 |     public static func uploadFile(
    |                        `- note: add '@available' attribute to enclosing static method
475 |         fileData: Data,
476 |         fileName: String,
    :
514 |         print("   Body size: \(body.count) bytes")
515 |
516 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
517 |
518 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:28: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                            |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:38: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                                      |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
[104/108] Compiling XMPPChatCore AuthAPI.swift
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:115:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
 82 |     /// - Parameter useEthoraJwtWordPrefix: If `true` (default), uses ``AppConfig/normalizedAppAuthorizationHeader(_:)`` (`JWT eyJ…`).
 83 |     ///   If `false`, sends only the raw three-part JWT (no leading `JWT ` / no `Bearer` added). See ``AppConfig/appAuthorizationHeader(fromPaste:useEthoraJwtWordPrefix:)``.
 84 |     public static func loginWithEmail(
    |                        `- note: add '@available' attribute to enclosing static method
 85 |         email: String,
 86 |         password: String,
    :
113 |         request.httpBody = try JSONEncoder().encode(body)
114 |
115 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
116 |
117 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:122:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
120 |
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:123:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
124 |
125 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:144:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
142 |         // Log response body
143 |         //NSlog("Full Response Data:")
144 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
145 |             // Try to pretty //print JSON
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:148:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
147 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
148 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
149 |                 //NSlog("%@", prettyString)
150 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:174:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
172 |             //print("")
173 |         //print("Full Response Data:")
174 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:177:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
177 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
178 |                 //print(prettyString)
179 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:215:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
213 |             return loginResponse
214 |         } catch {
215 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
216 |             //print("❌ AuthAPI.loginWithEmail Decode Error: \(error)")
217 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:260:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
229 |     ///   - appToken: App token for Authorization header
230 |     /// - Returns: New token and refreshToken
231 |     public static func refreshToken(
    |                        `- note: add '@available' attribute to enclosing static method
232 |         refreshToken: String,
233 |         baseURL: URL? = nil,
    :
258 |         _ = appToken // parameter kept for source compatibility; not used anymore
259 |
260 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
261 |
262 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:267:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
265 |
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
269 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:268:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:289:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
287 |         // Log response body
288 |         //NSlog("Full Response Data:")
289 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:292:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
292 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
293 |                 //NSlog("%@", prettyString)
294 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:318:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
316 |         //print("")
317 |         //print("Full Response Data:")
318 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:321:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
321 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
322 |                 //print(prettyString)
323 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:371:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
355 |     ///   - baseURL: API base URL
356 |     /// - Returns: LoginResponse with token, refreshToken, and user data
357 |     public static func loginViaJwt(
    |                        `- note: add '@available' attribute to enclosing static method
358 |         clientToken: String,
359 |         baseURL: URL? = nil
    :
369 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
370 |
371 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
372 |
373 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:406:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
404 |             return loginResponse
405 |         } catch {
406 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
407 |             //print("❌ AuthAPI.loginViaJwt Decode Error: \(error)")
408 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:437:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
420 |     ///   - appToken: App token for Authorization header
421 |     /// - Returns: Boolean indicating if email exists
422 |     public static func checkEmailExist(
    |                        `- note: add '@available' attribute to enclosing static method
423 |         email: String,
424 |         baseURL: URL? = nil,
    :
435 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
436 |
437 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
438 |
439 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:516:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
472 |     ///   - token: User token for Authorization header
473 |     /// - Returns: UploadResponse with file information
474 |     public static func uploadFile(
    |                        `- note: add '@available' attribute to enclosing static method
475 |         fileData: Data,
476 |         fileName: String,
    :
514 |         print("   Body size: \(body.count) bytes")
515 |
516 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
517 |
518 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:28: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                            |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:38: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                                      |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
[105/108] Compiling XMPPChatCore ImageCache.swift
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:115:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
 82 |     /// - Parameter useEthoraJwtWordPrefix: If `true` (default), uses ``AppConfig/normalizedAppAuthorizationHeader(_:)`` (`JWT eyJ…`).
 83 |     ///   If `false`, sends only the raw three-part JWT (no leading `JWT ` / no `Bearer` added). See ``AppConfig/appAuthorizationHeader(fromPaste:useEthoraJwtWordPrefix:)``.
 84 |     public static func loginWithEmail(
    |                        `- note: add '@available' attribute to enclosing static method
 85 |         email: String,
 86 |         password: String,
    :
113 |         request.httpBody = try JSONEncoder().encode(body)
114 |
115 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
116 |
117 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:122:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
120 |
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:123:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
124 |
125 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:144:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
142 |         // Log response body
143 |         //NSlog("Full Response Data:")
144 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
145 |             // Try to pretty //print JSON
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:148:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
147 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
148 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
149 |                 //NSlog("%@", prettyString)
150 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:174:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
172 |             //print("")
173 |         //print("Full Response Data:")
174 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:177:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
177 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
178 |                 //print(prettyString)
179 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:215:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
213 |             return loginResponse
214 |         } catch {
215 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
216 |             //print("❌ AuthAPI.loginWithEmail Decode Error: \(error)")
217 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:260:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
229 |     ///   - appToken: App token for Authorization header
230 |     /// - Returns: New token and refreshToken
231 |     public static func refreshToken(
    |                        `- note: add '@available' attribute to enclosing static method
232 |         refreshToken: String,
233 |         baseURL: URL? = nil,
    :
258 |         _ = appToken // parameter kept for source compatibility; not used anymore
259 |
260 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
261 |
262 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:267:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
265 |
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
269 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:268:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:289:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
287 |         // Log response body
288 |         //NSlog("Full Response Data:")
289 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:292:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
292 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
293 |                 //NSlog("%@", prettyString)
294 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:318:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
316 |         //print("")
317 |         //print("Full Response Data:")
318 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:321:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
321 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
322 |                 //print(prettyString)
323 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:371:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
355 |     ///   - baseURL: API base URL
356 |     /// - Returns: LoginResponse with token, refreshToken, and user data
357 |     public static func loginViaJwt(
    |                        `- note: add '@available' attribute to enclosing static method
358 |         clientToken: String,
359 |         baseURL: URL? = nil
    :
369 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
370 |
371 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
372 |
373 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:406:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
404 |             return loginResponse
405 |         } catch {
406 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
407 |             //print("❌ AuthAPI.loginViaJwt Decode Error: \(error)")
408 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:437:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
420 |     ///   - appToken: App token for Authorization header
421 |     /// - Returns: Boolean indicating if email exists
422 |     public static func checkEmailExist(
    |                        `- note: add '@available' attribute to enclosing static method
423 |         email: String,
424 |         baseURL: URL? = nil,
    :
435 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
436 |
437 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
438 |
439 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:516:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
472 |     ///   - token: User token for Authorization header
473 |     /// - Returns: UploadResponse with file information
474 |     public static func uploadFile(
    |                        `- note: add '@available' attribute to enclosing static method
475 |         fileData: Data,
476 |         fileName: String,
    :
514 |         print("   Body size: \(body.count) bytes")
515 |
516 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
517 |
518 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:28: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                            |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:38: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                                      |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
[106/108] Compiling XMPPChatCore PushAPI.swift
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:115:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
 82 |     /// - Parameter useEthoraJwtWordPrefix: If `true` (default), uses ``AppConfig/normalizedAppAuthorizationHeader(_:)`` (`JWT eyJ…`).
 83 |     ///   If `false`, sends only the raw three-part JWT (no leading `JWT ` / no `Bearer` added). See ``AppConfig/appAuthorizationHeader(fromPaste:useEthoraJwtWordPrefix:)``.
 84 |     public static func loginWithEmail(
    |                        `- note: add '@available' attribute to enclosing static method
 85 |         email: String,
 86 |         password: String,
    :
113 |         request.httpBody = try JSONEncoder().encode(body)
114 |
115 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
116 |
117 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:122:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
120 |
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:123:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
124 |
125 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:144:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
142 |         // Log response body
143 |         //NSlog("Full Response Data:")
144 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
145 |             // Try to pretty //print JSON
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:148:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
147 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
148 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
149 |                 //NSlog("%@", prettyString)
150 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:174:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
172 |             //print("")
173 |         //print("Full Response Data:")
174 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:177:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
177 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
178 |                 //print(prettyString)
179 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:215:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
213 |             return loginResponse
214 |         } catch {
215 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
216 |             //print("❌ AuthAPI.loginWithEmail Decode Error: \(error)")
217 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:260:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
229 |     ///   - appToken: App token for Authorization header
230 |     /// - Returns: New token and refreshToken
231 |     public static func refreshToken(
    |                        `- note: add '@available' attribute to enclosing static method
232 |         refreshToken: String,
233 |         baseURL: URL? = nil,
    :
258 |         _ = appToken // parameter kept for source compatibility; not used anymore
259 |
260 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
261 |
262 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:267:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
265 |
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
269 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:268:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:289:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
287 |         // Log response body
288 |         //NSlog("Full Response Data:")
289 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:292:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
292 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
293 |                 //NSlog("%@", prettyString)
294 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:318:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
316 |         //print("")
317 |         //print("Full Response Data:")
318 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:321:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
321 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
322 |                 //print(prettyString)
323 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:371:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
355 |     ///   - baseURL: API base URL
356 |     /// - Returns: LoginResponse with token, refreshToken, and user data
357 |     public static func loginViaJwt(
    |                        `- note: add '@available' attribute to enclosing static method
358 |         clientToken: String,
359 |         baseURL: URL? = nil
    :
369 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
370 |
371 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
372 |
373 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:406:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
404 |             return loginResponse
405 |         } catch {
406 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
407 |             //print("❌ AuthAPI.loginViaJwt Decode Error: \(error)")
408 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:437:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
420 |     ///   - appToken: App token for Authorization header
421 |     /// - Returns: Boolean indicating if email exists
422 |     public static func checkEmailExist(
    |                        `- note: add '@available' attribute to enclosing static method
423 |         email: String,
424 |         baseURL: URL? = nil,
    :
435 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
436 |
437 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
438 |
439 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:516:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
472 |     ///   - token: User token for Authorization header
473 |     /// - Returns: UploadResponse with file information
474 |     public static func uploadFile(
    |                        `- note: add '@available' attribute to enclosing static method
475 |         fileData: Data,
476 |         fileName: String,
    :
514 |         print("   Body size: \(body.count) bytes")
515 |
516 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
517 |
518 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:28: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                            |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:38: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                                      |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
[107/108] Compiling XMPPChatCore RoomsAPI+Actions.swift
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:115:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
 82 |     /// - Parameter useEthoraJwtWordPrefix: If `true` (default), uses ``AppConfig/normalizedAppAuthorizationHeader(_:)`` (`JWT eyJ…`).
 83 |     ///   If `false`, sends only the raw three-part JWT (no leading `JWT ` / no `Bearer` added). See ``AppConfig/appAuthorizationHeader(fromPaste:useEthoraJwtWordPrefix:)``.
 84 |     public static func loginWithEmail(
    |                        `- note: add '@available' attribute to enclosing static method
 85 |         email: String,
 86 |         password: String,
    :
113 |         request.httpBody = try JSONEncoder().encode(body)
114 |
115 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
116 |
117 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:122:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
120 |
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:123:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
124 |
125 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:144:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
142 |         // Log response body
143 |         //NSlog("Full Response Data:")
144 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
145 |             // Try to pretty //print JSON
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:148:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
147 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
148 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
149 |                 //NSlog("%@", prettyString)
150 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:174:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
172 |             //print("")
173 |         //print("Full Response Data:")
174 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:177:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
177 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
178 |                 //print(prettyString)
179 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:215:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
213 |             return loginResponse
214 |         } catch {
215 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
216 |             //print("❌ AuthAPI.loginWithEmail Decode Error: \(error)")
217 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:260:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
229 |     ///   - appToken: App token for Authorization header
230 |     /// - Returns: New token and refreshToken
231 |     public static func refreshToken(
    |                        `- note: add '@available' attribute to enclosing static method
232 |         refreshToken: String,
233 |         baseURL: URL? = nil,
    :
258 |         _ = appToken // parameter kept for source compatibility; not used anymore
259 |
260 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
261 |
262 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:267:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
265 |
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
269 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:268:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:289:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
287 |         // Log response body
288 |         //NSlog("Full Response Data:")
289 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:292:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
292 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
293 |                 //NSlog("%@", prettyString)
294 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:318:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
316 |         //print("")
317 |         //print("Full Response Data:")
318 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:321:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
321 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
322 |                 //print(prettyString)
323 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:371:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
355 |     ///   - baseURL: API base URL
356 |     /// - Returns: LoginResponse with token, refreshToken, and user data
357 |     public static func loginViaJwt(
    |                        `- note: add '@available' attribute to enclosing static method
358 |         clientToken: String,
359 |         baseURL: URL? = nil
    :
369 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
370 |
371 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
372 |
373 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:406:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
404 |             return loginResponse
405 |         } catch {
406 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
407 |             //print("❌ AuthAPI.loginViaJwt Decode Error: \(error)")
408 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:437:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
420 |     ///   - appToken: App token for Authorization header
421 |     /// - Returns: Boolean indicating if email exists
422 |     public static func checkEmailExist(
    |                        `- note: add '@available' attribute to enclosing static method
423 |         email: String,
424 |         baseURL: URL? = nil,
    :
435 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
436 |
437 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
438 |
439 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:516:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
472 |     ///   - token: User token for Authorization header
473 |     /// - Returns: UploadResponse with file information
474 |     public static func uploadFile(
    |                        `- note: add '@available' attribute to enclosing static method
475 |         fileData: Data,
476 |         fileName: String,
    :
514 |         print("   Body size: \(body.count) bytes")
515 |
516 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
517 |
518 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:28: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                            |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:38: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                                      |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
[108/108] Compiling XMPPChatCore RoomsAPI+Rooms.swift
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:115:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
 82 |     /// - Parameter useEthoraJwtWordPrefix: If `true` (default), uses ``AppConfig/normalizedAppAuthorizationHeader(_:)`` (`JWT eyJ…`).
 83 |     ///   If `false`, sends only the raw three-part JWT (no leading `JWT ` / no `Bearer` added). See ``AppConfig/appAuthorizationHeader(fromPaste:useEthoraJwtWordPrefix:)``.
 84 |     public static func loginWithEmail(
    |                        `- note: add '@available' attribute to enclosing static method
 85 |         email: String,
 86 |         password: String,
    :
113 |         request.httpBody = try JSONEncoder().encode(body)
114 |
115 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
116 |
117 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:122:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
120 |
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
124 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:123:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
121 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
122 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
123 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
124 |
125 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:136:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
134 |         //NSlog("Headers:")
135 |         for (key, value) in httpResponse.allHeaderFields {
136 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
137 |                 //NSlog("  %@: %@", keyString, valueString)
138 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:144:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
142 |         // Log response body
143 |         //NSlog("Full Response Data:")
144 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
145 |             // Try to pretty //print JSON
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:148:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
146 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
147 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
148 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
149 |                 //NSlog("%@", prettyString)
150 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:168:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
166 |         //print("Headers:")
167 |         for (key, value) in httpResponse.allHeaderFields {
168 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
169 |                 //print("  \(keyString): \(valueString)")
170 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:174:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
172 |             //print("")
173 |         //print("Full Response Data:")
174 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:177:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
175 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
176 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
177 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
178 |                 //print(prettyString)
179 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:215:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
213 |             return loginResponse
214 |         } catch {
215 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
216 |             //print("❌ AuthAPI.loginWithEmail Decode Error: \(error)")
217 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:260:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
229 |     ///   - appToken: App token for Authorization header
230 |     /// - Returns: New token and refreshToken
231 |     public static func refreshToken(
    |                        `- note: add '@available' attribute to enclosing static method
232 |         refreshToken: String,
233 |         baseURL: URL? = nil,
    :
258 |         _ = appToken // parameter kept for source compatibility; not used anymore
259 |
260 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
261 |
262 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:267:13: warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
265 |
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
    |             `- warning: initialization of immutable value 'separator' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
269 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:268:13: warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
266 |         // Log full API response to console - USING MULTIPLE METHODS TO ENSURE VISIBILITY
267 |         let separator = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
268 |         let statusText = HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)
    |             `- warning: initialization of immutable value 'statusText' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
269 |
270 |         // Use //NSlog for guaranteed visibility in Xcode console
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:281:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
279 |         //NSlog("Headers:")
280 |         for (key, value) in httpResponse.allHeaderFields {
281 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
282 |                 //NSlog("  %@: %@", keyString, valueString)
283 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:289:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
287 |         // Log response body
288 |         //NSlog("Full Response Data:")
289 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:292:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
290 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
291 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
292 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
293 |                 //NSlog("%@", prettyString)
294 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:20: warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                    `- warning: immutable value 'keyString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:312:52: warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
310 |         //print("Headers:")
311 |         for (key, value) in httpResponse.allHeaderFields {
312 |             if let keyString = key as? String, let valueString = value as? String {
    |                                                    `- warning: immutable value 'valueString' was never used; consider replacing with '_' or removing it [#no-usage]
313 |                 //print("  \(keyString): \(valueString)")
314 |             }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:318:16: warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
316 |         //print("")
317 |         //print("Full Response Data:")
318 |         if let responseBody = String(data: data, encoding: .utf8) {
    |                `- warning: value 'responseBody' was defined but never used; consider replacing with boolean test [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:321:20: warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
319 |             if let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []),
320 |                let prettyData = try? JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted]),
321 |                let prettyString = String(data: prettyData, encoding: .utf8) {
    |                    `- warning: immutable value 'prettyString' was never used; consider replacing with '_' or removing it [#no-usage]
322 |                 //print(prettyString)
323 |             } else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:371:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
355 |     ///   - baseURL: API base URL
356 |     /// - Returns: LoginResponse with token, refreshToken, and user data
357 |     public static func loginViaJwt(
    |                        `- note: add '@available' attribute to enclosing static method
358 |         clientToken: String,
359 |         baseURL: URL? = nil
    :
369 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
370 |
371 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
372 |
373 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:406:17: warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
404 |             return loginResponse
405 |         } catch {
406 |             let jsonString = String(data: data, encoding: .utf8) ?? "<no data>"
    |                 `- warning: initialization of immutable value 'jsonString' was never used; consider replacing with assignment to '_' or removing it [#no-usage]
407 |             //print("❌ AuthAPI.loginViaJwt Decode Error: \(error)")
408 |             //print("📄 Response body: \(jsonString)")
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:437:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
420 |     ///   - appToken: App token for Authorization header
421 |     /// - Returns: Boolean indicating if email exists
422 |     public static func checkEmailExist(
    |                        `- note: add '@available' attribute to enclosing static method
423 |         email: String,
424 |         baseURL: URL? = nil,
    :
435 |         request.setValue("application/json", forHTTPHeaderField: "Accept")
436 |
437 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
438 |
439 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/AuthAPI.swift:516:60: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
  9 | import os.log
 10 |
 11 | public struct AuthAPI {
    |               `- note: add '@available' attribute to enclosing struct
 12 |     // MARK: - Response Models
 13 |
    :
472 |     ///   - token: User token for Authorization header
473 |     /// - Returns: UploadResponse with file information
474 |     public static func uploadFile(
    |                        `- note: add '@available' attribute to enclosing static method
475 |         fileData: Data,
476 |         fileName: String,
    :
514 |         print("   Body size: \(body.count) bytes")
515 |
516 |         let (data, response) = try await URLSession.shared.data(for: request)
    |                                                            |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                            `- note: add 'if #available' version check
517 |
518 |         guard let httpResponse = response as? HTTPURLResponse else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:28: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                            |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                            `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:46:38: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 44 |         // override nor `ChatConfig.baseUrl` is set, the call throws
 45 |         // `ConfigError.missingBaseURL`.
 46 |         let config = await MainActor.run { ConfigStore.shared.config }
    |                                      |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                      `- note: add 'if #available' version check
 47 |
 48 |         let finalAppId: String
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:33: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                 |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                 `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:71:43: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
 69 |         let authURL = try await AppConfig.resolveBaseURL(authBaseURL)
 70 |
 71 |         let storedToken = await MainActor.run { UserStore.shared.token }
    |                                           |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                           `- note: add 'if #available' version check
 72 |         let userToken = token ?? storedToken
 73 |
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:105:68: error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
103 |                 request.httpBody = bodyData
104 |
105 |                 let (data, response) = try await URLSession.shared.data(for: request)
    |                                                                    |- error: 'data(for:delegate:)' is only available in macOS 12.0 or newer
    |                                                                    `- note: add 'if #available' version check
106 |                 guard let httpResponse = response as? HTTPURLResponse else {
107 |                     continue
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:46: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                              |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                                              `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:111:56: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
109 |
110 |                 if httpResponse.statusCode == 401 && !didRefresh {
111 |                     let refreshToken = await MainActor.run { UserStore.shared.refreshToken }
    |                                                        |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                                        `- note: add 'if #available' version check
112 |
113 |                     guard let refreshToken = refreshToken else {
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:31: error: 'MainActor' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                               |- error: 'MainActor' is only available in macOS 10.15 or newer
    |                               `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
/Users/admin/builder/spi-builder-workspace/Sources/XMPPChatCore/Networking/PushAPI.swift:123:41: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
 15 | }
 16 |
 17 | public struct PushAPI {
    |               `- note: add '@available' attribute to enclosing struct
 18 |     private struct PushSubscriptionBody: Codable {
 19 |         let registrationToken: String
    :
 31 |     ///   - authBaseURL: Auth API base URL for refresh
 32 |     ///   - didRefresh: Internal flag to avoid refresh loops
 33 |     public static func registerPushToken(
    |                        `- note: add '@available' attribute to enclosing static method
 34 |         registrationToken: String,
 35 |         deviceType: PushDeviceType,
    :
121 |                         )
122 |
123 |                         await MainActor.run {
    |                                         |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
    |                                         `- note: add 'if #available' version check
124 |                             UserStore.shared.updateTokens(token: newToken, refreshToken: newRefreshToken)
125 |                         }
warning: 'starscream': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/admin/builder/spi-builder-workspace/.build/checkouts/Starscream/Sources/Info.plist
BUILD FAILURE 6.3 macosSpm