Build Information
Successful build of Appwrite, reference main (903c6f), with Swift 6.1 for macOS (SPM) on 30 Oct 2026 14:19:33 UTC.
Swift 6 data race errors: 22
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCapturesBuild Log
| |- note: add '@MainActor' to make static property 'appGroupWarned' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1375 |
1376 | /// Without the App Group the Notification Service Extension can't fetch, and the placeholder stays.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:717:17: warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
250 | /// // sub.update(background: true, title: "Messages")
251 | /// sub.unsubscribe()
252 | open class Push: Service {
| `- note: class 'Push' does not conform to the 'Sendable' protocol
253 | // Fixed keep-alive (PINGREQ interval) in seconds — not exposed as an option.
254 | private static let keepAliveSeconds: UInt16 = 60
:
715 | // Already disconnected (e.g. the broker dropped the connection); nothing to send.
716 | } catch {
717 | self?.surface(Push.describe(error))
| `- warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
718 | }
719 | do {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:923:38: warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
921 | port: port,
922 | identifier: id,
923 | eventLoopGroupProvider: .createNew,
| `- warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
924 | configuration: configuration
925 | )
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1214:21: warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
1212 | URLSession.shared.downloadTask(with: URLRequest(url: url, timeoutInterval: 10)) { location, response, _ in
1213 | guard let location, let fileExtension = attachmentExtension(url, mimeType: response?.mimeType) else {
1214 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1215 | return
1216 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:45: warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:194:54: note: property declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
| `- note: property declared here
195 |
196 | - (void)hide:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:38: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:193:61: note: class property declared here
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
| `- note: class property declared here
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
195 |
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:20:20: warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | static let liveWindow: TimeInterval = 10
19 | static let pendingLifetime: TimeInterval = 30
20 | static var inServiceExtension = false
| |- warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'inServiceExtension' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'inServiceExtension' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private static let prefix = "appwrite.push.shared"
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:57:20: warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
55 | }
56 |
57 | static var defaults: UserDefaults = appGroup.flatMap { UserDefaults(suiteName: $0) } ?? .standard
| |- warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
58 |
59 | // MARK: Session
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1707:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1705 | let pushes = apnsLocked { apnsPushes.values.compactMap { $0.push } }
1706 | if message.wake {
1707 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1708 | var woke = false
1709 | for push in pushes {
:
1712 | }
1713 | }
1714 | completion?(woke)
| `- note: closure captures 'completion' which is accessible to code in the current task
1715 | }
1716 | return true
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1507:13: warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
1505 | }
1506 | for push in pushes where !push.backgroundTopics().isEmpty {
1507 | Task { await register(push, token: hex, topics: push.backgroundTopics()) }
| |- warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
| |- note: Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code
| `- note: access can happen concurrently
1508 | }
1509 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1472:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1470 | }
1471 | let scheduler = WeakPush(push)
1472 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1473 | try? await Task.sleep(nanoseconds: UInt64(reconcileDelay * 1_000_000_000))
1474 | await reconcile(userId: userId, targetId: targetId, fallback: scheduler.push)
| `- note: closure captures 'scheduler' which is accessible to code in the current task
1475 | }
1476 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1401:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1399 | }
1400 | if let token {
1401 | Task { await register(push, token: token, topics: topics) }
| | `- note: closure captures 'push' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1402 | }
1403 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1077:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1075 | private func inBackground(_ operation: @escaping () async throws -> Void) {
1076 | let generation = sync.sync { closeGeneration }
1077 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1078 | do {
1079 | try await operation()
| `- note: closure captures non-Sendable 'operation'
1080 | } catch {
1081 | guard let self, !self.sync.sync(execute: { self.closing || self.closeGeneration != generation }) else { return }
| `- note: closure captures non-Sendable 'self'
1082 | self.surface(Push.describe(error))
1083 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1414:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1412 | let targetId = Push.targetId(for: userId)
1413 | let linked = apnsLocked { apnsLinked[targetId] ?? [] }
1414 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1415 | for topic in topics where linked.contains(topic) {
1416 | await unlink(push, targetId: targetId, topic: topic)
| `- note: closure captures 'push' which is accessible to code in the current task
1417 | }
1418 | // The target is shared by every Push of the user, so check again just before deleting it.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:766:32: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
764 | self.connectedKey = key
765 | let epoch = self.connectionEpoch
766 | let created = Task { () throws -> MQTTClient in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
767 | do {
768 | let client = try await self.open()
| `- note: closure captures 'self' which is accessible to code in the current task
769 | let current = self.sync.sync { () -> Bool in
770 | guard self.connectionEpoch == epoch else { return false }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:997:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
995 | }
996 | guard let client else { return }
997 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
998 | await reconnectLoop(client)
| `- note: closure captures 'self' which is accessible to code in the current task
999 | sync.sync { self.reconnecting = false }
1000 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:63:30: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | private func startHeartbeat() {
62 | stopHeartbeat()
63 | heartbeatTask = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | while !Task.isCancelled {
66 | if let client = socketClient, client.isConnected {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | client.send(text: #"{"type": "ping"}"#)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:101:51: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
99 | return existing
100 | }
101 | let newTask = Task<Void, Swift.Error> { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
103 | defer {
104 | self.connectSync.sync { self.socketCreationTask = nil }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:349:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
347 | }
348 | if needsSocket {
349 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | do {
351 | try await self?.createSocket()
| `- note: closure captures 'self' which is accessible to code in the current task
352 | } catch {
353 | Realtime.logDiagnostic("Failed to open realtime socket for presence: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:614:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
612 | Realtime.logDiagnostic("Realtime disconnected. Re-connecting in \(timeout / 1000) seconds.")
613 |
614 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
615 | try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000))
616 |
617 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
618 | self.reconnectAttempts += 1
619 |
[1267/1271] Compiling Appwrite Presences.swift
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:66:20: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
63 | /// delegate when the first `Push` is created and forwards everything else to the delegate it
64 | /// replaced. A tap while nothing listens waits for `Push.getInitialNotification()`.
65 | final class PushNotificationTaps: NSObject, UNUserNotificationCenterDelegate {
| `- note: class 'PushNotificationTaps' does not conform to the 'Sendable' protocol
66 | static let shared = PushNotificationTaps()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
67 |
68 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1326:24: warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1324 |
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
| |- warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsToken' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsToken' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1327:24: warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
| |- warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsPushes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsPushes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1328:24: warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
| |- warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinked' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinked' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1329:24: warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
| |- warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsProxyInstalled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsProxyInstalled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1330:24: warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
| |- warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsRegistrationRequested' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsRegistrationRequested' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1331:16: warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
| |- warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsDeliveries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsDeliveries' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1332:16: warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
| |- warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinkedTopics' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinkedTopics' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1333:24: warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
| |- warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsReconciled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsReconciled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1335:16: warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
| |- warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'reconcileDelay' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'reconcileDelay' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | private final class WeakPush {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1374:24: warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1372 | }
1373 |
1374 | private static var appGroupWarned = false
| |- warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appGroupWarned' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'appGroupWarned' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1375 |
1376 | /// Without the App Group the Notification Service Extension can't fetch, and the placeholder stays.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:717:17: warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
250 | /// // sub.update(background: true, title: "Messages")
251 | /// sub.unsubscribe()
252 | open class Push: Service {
| `- note: class 'Push' does not conform to the 'Sendable' protocol
253 | // Fixed keep-alive (PINGREQ interval) in seconds — not exposed as an option.
254 | private static let keepAliveSeconds: UInt16 = 60
:
715 | // Already disconnected (e.g. the broker dropped the connection); nothing to send.
716 | } catch {
717 | self?.surface(Push.describe(error))
| `- warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
718 | }
719 | do {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:923:38: warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
921 | port: port,
922 | identifier: id,
923 | eventLoopGroupProvider: .createNew,
| `- warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
924 | configuration: configuration
925 | )
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1214:21: warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
1212 | URLSession.shared.downloadTask(with: URLRequest(url: url, timeoutInterval: 10)) { location, response, _ in
1213 | guard let location, let fileExtension = attachmentExtension(url, mimeType: response?.mimeType) else {
1214 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1215 | return
1216 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:45: warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:194:54: note: property declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
| `- note: property declared here
195 |
196 | - (void)hide:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:38: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:193:61: note: class property declared here
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
| `- note: class property declared here
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
195 |
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:20:20: warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | static let liveWindow: TimeInterval = 10
19 | static let pendingLifetime: TimeInterval = 30
20 | static var inServiceExtension = false
| |- warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'inServiceExtension' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'inServiceExtension' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private static let prefix = "appwrite.push.shared"
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:57:20: warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
55 | }
56 |
57 | static var defaults: UserDefaults = appGroup.flatMap { UserDefaults(suiteName: $0) } ?? .standard
| |- warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
58 |
59 | // MARK: Session
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1707:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1705 | let pushes = apnsLocked { apnsPushes.values.compactMap { $0.push } }
1706 | if message.wake {
1707 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1708 | var woke = false
1709 | for push in pushes {
:
1712 | }
1713 | }
1714 | completion?(woke)
| `- note: closure captures 'completion' which is accessible to code in the current task
1715 | }
1716 | return true
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1507:13: warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
1505 | }
1506 | for push in pushes where !push.backgroundTopics().isEmpty {
1507 | Task { await register(push, token: hex, topics: push.backgroundTopics()) }
| |- warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
| |- note: Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code
| `- note: access can happen concurrently
1508 | }
1509 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1472:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1470 | }
1471 | let scheduler = WeakPush(push)
1472 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1473 | try? await Task.sleep(nanoseconds: UInt64(reconcileDelay * 1_000_000_000))
1474 | await reconcile(userId: userId, targetId: targetId, fallback: scheduler.push)
| `- note: closure captures 'scheduler' which is accessible to code in the current task
1475 | }
1476 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1401:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1399 | }
1400 | if let token {
1401 | Task { await register(push, token: token, topics: topics) }
| | `- note: closure captures 'push' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1402 | }
1403 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1077:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1075 | private func inBackground(_ operation: @escaping () async throws -> Void) {
1076 | let generation = sync.sync { closeGeneration }
1077 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1078 | do {
1079 | try await operation()
| `- note: closure captures non-Sendable 'operation'
1080 | } catch {
1081 | guard let self, !self.sync.sync(execute: { self.closing || self.closeGeneration != generation }) else { return }
| `- note: closure captures non-Sendable 'self'
1082 | self.surface(Push.describe(error))
1083 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1414:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1412 | let targetId = Push.targetId(for: userId)
1413 | let linked = apnsLocked { apnsLinked[targetId] ?? [] }
1414 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1415 | for topic in topics where linked.contains(topic) {
1416 | await unlink(push, targetId: targetId, topic: topic)
| `- note: closure captures 'push' which is accessible to code in the current task
1417 | }
1418 | // The target is shared by every Push of the user, so check again just before deleting it.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:766:32: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
764 | self.connectedKey = key
765 | let epoch = self.connectionEpoch
766 | let created = Task { () throws -> MQTTClient in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
767 | do {
768 | let client = try await self.open()
| `- note: closure captures 'self' which is accessible to code in the current task
769 | let current = self.sync.sync { () -> Bool in
770 | guard self.connectionEpoch == epoch else { return false }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:997:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
995 | }
996 | guard let client else { return }
997 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
998 | await reconnectLoop(client)
| `- note: closure captures 'self' which is accessible to code in the current task
999 | sync.sync { self.reconnecting = false }
1000 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:63:30: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | private func startHeartbeat() {
62 | stopHeartbeat()
63 | heartbeatTask = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | while !Task.isCancelled {
66 | if let client = socketClient, client.isConnected {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | client.send(text: #"{"type": "ping"}"#)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:101:51: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
99 | return existing
100 | }
101 | let newTask = Task<Void, Swift.Error> { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
103 | defer {
104 | self.connectSync.sync { self.socketCreationTask = nil }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:349:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
347 | }
348 | if needsSocket {
349 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | do {
351 | try await self?.createSocket()
| `- note: closure captures 'self' which is accessible to code in the current task
352 | } catch {
353 | Realtime.logDiagnostic("Failed to open realtime socket for presence: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:614:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
612 | Realtime.logDiagnostic("Realtime disconnected. Re-connecting in \(timeout / 1000) seconds.")
613 |
614 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
615 | try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000))
616 |
617 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
618 | self.reconnectAttempts += 1
619 |
[1268/1271] Compiling Appwrite Push.swift
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:66:20: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
63 | /// delegate when the first `Push` is created and forwards everything else to the delegate it
64 | /// replaced. A tap while nothing listens waits for `Push.getInitialNotification()`.
65 | final class PushNotificationTaps: NSObject, UNUserNotificationCenterDelegate {
| `- note: class 'PushNotificationTaps' does not conform to the 'Sendable' protocol
66 | static let shared = PushNotificationTaps()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
67 |
68 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1326:24: warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1324 |
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
| |- warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsToken' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsToken' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1327:24: warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
| |- warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsPushes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsPushes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1328:24: warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
| |- warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinked' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinked' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1329:24: warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
| |- warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsProxyInstalled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsProxyInstalled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1330:24: warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
| |- warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsRegistrationRequested' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsRegistrationRequested' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1331:16: warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
| |- warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsDeliveries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsDeliveries' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1332:16: warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
| |- warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinkedTopics' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinkedTopics' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1333:24: warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
| |- warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsReconciled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsReconciled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1335:16: warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
| |- warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'reconcileDelay' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'reconcileDelay' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | private final class WeakPush {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1374:24: warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1372 | }
1373 |
1374 | private static var appGroupWarned = false
| |- warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appGroupWarned' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'appGroupWarned' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1375 |
1376 | /// Without the App Group the Notification Service Extension can't fetch, and the placeholder stays.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:717:17: warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
250 | /// // sub.update(background: true, title: "Messages")
251 | /// sub.unsubscribe()
252 | open class Push: Service {
| `- note: class 'Push' does not conform to the 'Sendable' protocol
253 | // Fixed keep-alive (PINGREQ interval) in seconds — not exposed as an option.
254 | private static let keepAliveSeconds: UInt16 = 60
:
715 | // Already disconnected (e.g. the broker dropped the connection); nothing to send.
716 | } catch {
717 | self?.surface(Push.describe(error))
| `- warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
718 | }
719 | do {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:923:38: warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
921 | port: port,
922 | identifier: id,
923 | eventLoopGroupProvider: .createNew,
| `- warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
924 | configuration: configuration
925 | )
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1214:21: warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
1212 | URLSession.shared.downloadTask(with: URLRequest(url: url, timeoutInterval: 10)) { location, response, _ in
1213 | guard let location, let fileExtension = attachmentExtension(url, mimeType: response?.mimeType) else {
1214 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1215 | return
1216 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:45: warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:194:54: note: property declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
| `- note: property declared here
195 |
196 | - (void)hide:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:38: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:193:61: note: class property declared here
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
| `- note: class property declared here
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
195 |
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:20:20: warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | static let liveWindow: TimeInterval = 10
19 | static let pendingLifetime: TimeInterval = 30
20 | static var inServiceExtension = false
| |- warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'inServiceExtension' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'inServiceExtension' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private static let prefix = "appwrite.push.shared"
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:57:20: warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
55 | }
56 |
57 | static var defaults: UserDefaults = appGroup.flatMap { UserDefaults(suiteName: $0) } ?? .standard
| |- warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
58 |
59 | // MARK: Session
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1707:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1705 | let pushes = apnsLocked { apnsPushes.values.compactMap { $0.push } }
1706 | if message.wake {
1707 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1708 | var woke = false
1709 | for push in pushes {
:
1712 | }
1713 | }
1714 | completion?(woke)
| `- note: closure captures 'completion' which is accessible to code in the current task
1715 | }
1716 | return true
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1507:13: warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
1505 | }
1506 | for push in pushes where !push.backgroundTopics().isEmpty {
1507 | Task { await register(push, token: hex, topics: push.backgroundTopics()) }
| |- warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
| |- note: Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code
| `- note: access can happen concurrently
1508 | }
1509 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1472:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1470 | }
1471 | let scheduler = WeakPush(push)
1472 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1473 | try? await Task.sleep(nanoseconds: UInt64(reconcileDelay * 1_000_000_000))
1474 | await reconcile(userId: userId, targetId: targetId, fallback: scheduler.push)
| `- note: closure captures 'scheduler' which is accessible to code in the current task
1475 | }
1476 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1401:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1399 | }
1400 | if let token {
1401 | Task { await register(push, token: token, topics: topics) }
| | `- note: closure captures 'push' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1402 | }
1403 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1077:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1075 | private func inBackground(_ operation: @escaping () async throws -> Void) {
1076 | let generation = sync.sync { closeGeneration }
1077 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1078 | do {
1079 | try await operation()
| `- note: closure captures non-Sendable 'operation'
1080 | } catch {
1081 | guard let self, !self.sync.sync(execute: { self.closing || self.closeGeneration != generation }) else { return }
| `- note: closure captures non-Sendable 'self'
1082 | self.surface(Push.describe(error))
1083 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1414:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1412 | let targetId = Push.targetId(for: userId)
1413 | let linked = apnsLocked { apnsLinked[targetId] ?? [] }
1414 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1415 | for topic in topics where linked.contains(topic) {
1416 | await unlink(push, targetId: targetId, topic: topic)
| `- note: closure captures 'push' which is accessible to code in the current task
1417 | }
1418 | // The target is shared by every Push of the user, so check again just before deleting it.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:766:32: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
764 | self.connectedKey = key
765 | let epoch = self.connectionEpoch
766 | let created = Task { () throws -> MQTTClient in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
767 | do {
768 | let client = try await self.open()
| `- note: closure captures 'self' which is accessible to code in the current task
769 | let current = self.sync.sync { () -> Bool in
770 | guard self.connectionEpoch == epoch else { return false }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:997:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
995 | }
996 | guard let client else { return }
997 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
998 | await reconnectLoop(client)
| `- note: closure captures 'self' which is accessible to code in the current task
999 | sync.sync { self.reconnecting = false }
1000 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:63:30: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | private func startHeartbeat() {
62 | stopHeartbeat()
63 | heartbeatTask = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | while !Task.isCancelled {
66 | if let client = socketClient, client.isConnected {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | client.send(text: #"{"type": "ping"}"#)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:101:51: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
99 | return existing
100 | }
101 | let newTask = Task<Void, Swift.Error> { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
103 | defer {
104 | self.connectSync.sync { self.socketCreationTask = nil }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:349:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
347 | }
348 | if needsSocket {
349 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | do {
351 | try await self?.createSocket()
| `- note: closure captures 'self' which is accessible to code in the current task
352 | } catch {
353 | Realtime.logDiagnostic("Failed to open realtime socket for presence: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:614:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
612 | Realtime.logDiagnostic("Realtime disconnected. Re-connecting in \(timeout / 1000) seconds.")
613 |
614 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
615 | try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000))
616 |
617 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
618 | self.reconnectAttempts += 1
619 |
[1269/1271] Compiling Appwrite PushServiceExtension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:66:20: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
63 | /// delegate when the first `Push` is created and forwards everything else to the delegate it
64 | /// replaced. A tap while nothing listens waits for `Push.getInitialNotification()`.
65 | final class PushNotificationTaps: NSObject, UNUserNotificationCenterDelegate {
| `- note: class 'PushNotificationTaps' does not conform to the 'Sendable' protocol
66 | static let shared = PushNotificationTaps()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
67 |
68 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1326:24: warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1324 |
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
| |- warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsToken' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsToken' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1327:24: warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
| |- warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsPushes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsPushes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1328:24: warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
| |- warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinked' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinked' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1329:24: warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
| |- warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsProxyInstalled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsProxyInstalled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1330:24: warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
| |- warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsRegistrationRequested' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsRegistrationRequested' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1331:16: warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
| |- warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsDeliveries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsDeliveries' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1332:16: warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
| |- warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinkedTopics' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinkedTopics' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1333:24: warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
| |- warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsReconciled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsReconciled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1335:16: warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
| |- warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'reconcileDelay' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'reconcileDelay' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | private final class WeakPush {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1374:24: warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1372 | }
1373 |
1374 | private static var appGroupWarned = false
| |- warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appGroupWarned' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'appGroupWarned' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1375 |
1376 | /// Without the App Group the Notification Service Extension can't fetch, and the placeholder stays.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:717:17: warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
250 | /// // sub.update(background: true, title: "Messages")
251 | /// sub.unsubscribe()
252 | open class Push: Service {
| `- note: class 'Push' does not conform to the 'Sendable' protocol
253 | // Fixed keep-alive (PINGREQ interval) in seconds — not exposed as an option.
254 | private static let keepAliveSeconds: UInt16 = 60
:
715 | // Already disconnected (e.g. the broker dropped the connection); nothing to send.
716 | } catch {
717 | self?.surface(Push.describe(error))
| `- warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
718 | }
719 | do {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:923:38: warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
921 | port: port,
922 | identifier: id,
923 | eventLoopGroupProvider: .createNew,
| `- warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
924 | configuration: configuration
925 | )
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1214:21: warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
1212 | URLSession.shared.downloadTask(with: URLRequest(url: url, timeoutInterval: 10)) { location, response, _ in
1213 | guard let location, let fileExtension = attachmentExtension(url, mimeType: response?.mimeType) else {
1214 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1215 | return
1216 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:45: warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:194:54: note: property declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
| `- note: property declared here
195 |
196 | - (void)hide:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:38: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:193:61: note: class property declared here
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
| `- note: class property declared here
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
195 |
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:20:20: warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | static let liveWindow: TimeInterval = 10
19 | static let pendingLifetime: TimeInterval = 30
20 | static var inServiceExtension = false
| |- warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'inServiceExtension' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'inServiceExtension' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private static let prefix = "appwrite.push.shared"
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:57:20: warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
55 | }
56 |
57 | static var defaults: UserDefaults = appGroup.flatMap { UserDefaults(suiteName: $0) } ?? .standard
| |- warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
58 |
59 | // MARK: Session
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1707:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1705 | let pushes = apnsLocked { apnsPushes.values.compactMap { $0.push } }
1706 | if message.wake {
1707 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1708 | var woke = false
1709 | for push in pushes {
:
1712 | }
1713 | }
1714 | completion?(woke)
| `- note: closure captures 'completion' which is accessible to code in the current task
1715 | }
1716 | return true
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1507:13: warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
1505 | }
1506 | for push in pushes where !push.backgroundTopics().isEmpty {
1507 | Task { await register(push, token: hex, topics: push.backgroundTopics()) }
| |- warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
| |- note: Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code
| `- note: access can happen concurrently
1508 | }
1509 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1472:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1470 | }
1471 | let scheduler = WeakPush(push)
1472 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1473 | try? await Task.sleep(nanoseconds: UInt64(reconcileDelay * 1_000_000_000))
1474 | await reconcile(userId: userId, targetId: targetId, fallback: scheduler.push)
| `- note: closure captures 'scheduler' which is accessible to code in the current task
1475 | }
1476 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1401:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1399 | }
1400 | if let token {
1401 | Task { await register(push, token: token, topics: topics) }
| | `- note: closure captures 'push' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1402 | }
1403 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1077:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1075 | private func inBackground(_ operation: @escaping () async throws -> Void) {
1076 | let generation = sync.sync { closeGeneration }
1077 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1078 | do {
1079 | try await operation()
| `- note: closure captures non-Sendable 'operation'
1080 | } catch {
1081 | guard let self, !self.sync.sync(execute: { self.closing || self.closeGeneration != generation }) else { return }
| `- note: closure captures non-Sendable 'self'
1082 | self.surface(Push.describe(error))
1083 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1414:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1412 | let targetId = Push.targetId(for: userId)
1413 | let linked = apnsLocked { apnsLinked[targetId] ?? [] }
1414 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1415 | for topic in topics where linked.contains(topic) {
1416 | await unlink(push, targetId: targetId, topic: topic)
| `- note: closure captures 'push' which is accessible to code in the current task
1417 | }
1418 | // The target is shared by every Push of the user, so check again just before deleting it.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:766:32: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
764 | self.connectedKey = key
765 | let epoch = self.connectionEpoch
766 | let created = Task { () throws -> MQTTClient in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
767 | do {
768 | let client = try await self.open()
| `- note: closure captures 'self' which is accessible to code in the current task
769 | let current = self.sync.sync { () -> Bool in
770 | guard self.connectionEpoch == epoch else { return false }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:997:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
995 | }
996 | guard let client else { return }
997 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
998 | await reconnectLoop(client)
| `- note: closure captures 'self' which is accessible to code in the current task
999 | sync.sync { self.reconnecting = false }
1000 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:63:30: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | private func startHeartbeat() {
62 | stopHeartbeat()
63 | heartbeatTask = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | while !Task.isCancelled {
66 | if let client = socketClient, client.isConnected {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | client.send(text: #"{"type": "ping"}"#)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:101:51: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
99 | return existing
100 | }
101 | let newTask = Task<Void, Swift.Error> { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
103 | defer {
104 | self.connectSync.sync { self.socketCreationTask = nil }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:349:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
347 | }
348 | if needsSocket {
349 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | do {
351 | try await self?.createSocket()
| `- note: closure captures 'self' which is accessible to code in the current task
352 | } catch {
353 | Realtime.logDiagnostic("Failed to open realtime socket for presence: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:614:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
612 | Realtime.logDiagnostic("Realtime disconnected. Re-connecting in \(timeout / 1000) seconds.")
613 |
614 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
615 | try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000))
616 |
617 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
618 | self.reconnectAttempts += 1
619 |
[1270/1271] Compiling Appwrite Realtime.swift
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:66:20: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
63 | /// delegate when the first `Push` is created and forwards everything else to the delegate it
64 | /// replaced. A tap while nothing listens waits for `Push.getInitialNotification()`.
65 | final class PushNotificationTaps: NSObject, UNUserNotificationCenterDelegate {
| `- note: class 'PushNotificationTaps' does not conform to the 'Sendable' protocol
66 | static let shared = PushNotificationTaps()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
67 |
68 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1326:24: warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1324 |
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
| |- warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsToken' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsToken' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1327:24: warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
| |- warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsPushes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsPushes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1328:24: warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
| |- warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinked' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinked' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1329:24: warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
| |- warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsProxyInstalled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsProxyInstalled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1330:24: warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
| |- warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsRegistrationRequested' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsRegistrationRequested' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1331:16: warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
| |- warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsDeliveries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsDeliveries' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1332:16: warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
| |- warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinkedTopics' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinkedTopics' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1333:24: warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
| |- warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsReconciled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsReconciled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1335:16: warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
| |- warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'reconcileDelay' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'reconcileDelay' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | private final class WeakPush {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1374:24: warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1372 | }
1373 |
1374 | private static var appGroupWarned = false
| |- warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appGroupWarned' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'appGroupWarned' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1375 |
1376 | /// Without the App Group the Notification Service Extension can't fetch, and the placeholder stays.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:717:17: warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
250 | /// // sub.update(background: true, title: "Messages")
251 | /// sub.unsubscribe()
252 | open class Push: Service {
| `- note: class 'Push' does not conform to the 'Sendable' protocol
253 | // Fixed keep-alive (PINGREQ interval) in seconds — not exposed as an option.
254 | private static let keepAliveSeconds: UInt16 = 60
:
715 | // Already disconnected (e.g. the broker dropped the connection); nothing to send.
716 | } catch {
717 | self?.surface(Push.describe(error))
| `- warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
718 | }
719 | do {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:923:38: warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
921 | port: port,
922 | identifier: id,
923 | eventLoopGroupProvider: .createNew,
| `- warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
924 | configuration: configuration
925 | )
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1214:21: warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
1212 | URLSession.shared.downloadTask(with: URLRequest(url: url, timeoutInterval: 10)) { location, response, _ in
1213 | guard let location, let fileExtension = attachmentExtension(url, mimeType: response?.mimeType) else {
1214 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1215 | return
1216 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:45: warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:194:54: note: property declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
| `- note: property declared here
195 |
196 | - (void)hide:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:38: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:193:61: note: class property declared here
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
| `- note: class property declared here
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
195 |
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:20:20: warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | static let liveWindow: TimeInterval = 10
19 | static let pendingLifetime: TimeInterval = 30
20 | static var inServiceExtension = false
| |- warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'inServiceExtension' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'inServiceExtension' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private static let prefix = "appwrite.push.shared"
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:57:20: warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
55 | }
56 |
57 | static var defaults: UserDefaults = appGroup.flatMap { UserDefaults(suiteName: $0) } ?? .standard
| |- warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
58 |
59 | // MARK: Session
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1707:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1705 | let pushes = apnsLocked { apnsPushes.values.compactMap { $0.push } }
1706 | if message.wake {
1707 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1708 | var woke = false
1709 | for push in pushes {
:
1712 | }
1713 | }
1714 | completion?(woke)
| `- note: closure captures 'completion' which is accessible to code in the current task
1715 | }
1716 | return true
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1507:13: warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
1505 | }
1506 | for push in pushes where !push.backgroundTopics().isEmpty {
1507 | Task { await register(push, token: hex, topics: push.backgroundTopics()) }
| |- warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
| |- note: Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code
| `- note: access can happen concurrently
1508 | }
1509 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1472:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1470 | }
1471 | let scheduler = WeakPush(push)
1472 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1473 | try? await Task.sleep(nanoseconds: UInt64(reconcileDelay * 1_000_000_000))
1474 | await reconcile(userId: userId, targetId: targetId, fallback: scheduler.push)
| `- note: closure captures 'scheduler' which is accessible to code in the current task
1475 | }
1476 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1401:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1399 | }
1400 | if let token {
1401 | Task { await register(push, token: token, topics: topics) }
| | `- note: closure captures 'push' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1402 | }
1403 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1077:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1075 | private func inBackground(_ operation: @escaping () async throws -> Void) {
1076 | let generation = sync.sync { closeGeneration }
1077 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1078 | do {
1079 | try await operation()
| `- note: closure captures non-Sendable 'operation'
1080 | } catch {
1081 | guard let self, !self.sync.sync(execute: { self.closing || self.closeGeneration != generation }) else { return }
| `- note: closure captures non-Sendable 'self'
1082 | self.surface(Push.describe(error))
1083 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1414:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1412 | let targetId = Push.targetId(for: userId)
1413 | let linked = apnsLocked { apnsLinked[targetId] ?? [] }
1414 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1415 | for topic in topics where linked.contains(topic) {
1416 | await unlink(push, targetId: targetId, topic: topic)
| `- note: closure captures 'push' which is accessible to code in the current task
1417 | }
1418 | // The target is shared by every Push of the user, so check again just before deleting it.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:766:32: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
764 | self.connectedKey = key
765 | let epoch = self.connectionEpoch
766 | let created = Task { () throws -> MQTTClient in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
767 | do {
768 | let client = try await self.open()
| `- note: closure captures 'self' which is accessible to code in the current task
769 | let current = self.sync.sync { () -> Bool in
770 | guard self.connectionEpoch == epoch else { return false }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:997:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
995 | }
996 | guard let client else { return }
997 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
998 | await reconnectLoop(client)
| `- note: closure captures 'self' which is accessible to code in the current task
999 | sync.sync { self.reconnecting = false }
1000 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:63:30: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | private func startHeartbeat() {
62 | stopHeartbeat()
63 | heartbeatTask = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | while !Task.isCancelled {
66 | if let client = socketClient, client.isConnected {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | client.send(text: #"{"type": "ping"}"#)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:101:51: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
99 | return existing
100 | }
101 | let newTask = Task<Void, Swift.Error> { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
103 | defer {
104 | self.connectSync.sync { self.socketCreationTask = nil }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:349:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
347 | }
348 | if needsSocket {
349 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | do {
351 | try await self?.createSocket()
| `- note: closure captures 'self' which is accessible to code in the current task
352 | } catch {
353 | Realtime.logDiagnostic("Failed to open realtime socket for presence: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:614:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
612 | Realtime.logDiagnostic("Realtime disconnected. Re-connecting in \(timeout / 1000) seconds.")
613 |
614 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
615 | try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000))
616 |
617 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
618 | self.reconnectAttempts += 1
619 |
[1271/1271] Compiling Appwrite Service.swift
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:66:20: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
63 | /// delegate when the first `Push` is created and forwards everything else to the delegate it
64 | /// replaced. A tap while nothing listens waits for `Push.getInitialNotification()`.
65 | final class PushNotificationTaps: NSObject, UNUserNotificationCenterDelegate {
| `- note: class 'PushNotificationTaps' does not conform to the 'Sendable' protocol
66 | static let shared = PushNotificationTaps()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PushNotificationTaps' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
67 |
68 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1326:24: warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1324 |
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
| |- warning: static property 'apnsToken' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsToken' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsToken' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1327:24: warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1325 | private static let apnsLock = NSLock()
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
| |- warning: static property 'apnsPushes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsPushes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsPushes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1328:24: warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1326 | private static var apnsToken: String?
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
| |- warning: static property 'apnsLinked' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinked' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinked' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1329:24: warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1327 | private static var apnsPushes: [ObjectIdentifier: WeakPush] = [:]
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
| |- warning: static property 'apnsProxyInstalled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsProxyInstalled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsProxyInstalled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1330:24: warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1328 | private static var apnsLinked: [String: Set<String>] = [:]
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
| |- warning: static property 'apnsRegistrationRequested' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsRegistrationRequested' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsRegistrationRequested' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1331:16: warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1329 | private static var apnsProxyInstalled = false
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
| |- warning: static property 'apnsDeliveries' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsDeliveries' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsDeliveries' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1332:16: warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1330 | private static var apnsRegistrationRequested = false
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
| |- warning: static property 'apnsLinkedTopics' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsLinkedTopics' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsLinkedTopics' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1333:24: warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1331 | static var apnsDeliveries = Deliveries(defaults: Shared.defaults)
1332 | static var apnsLinkedTopics = LinkedTopics(defaults: Shared.defaults)
1333 | private static var apnsReconciled: Set<String> = []
| |- warning: static property 'apnsReconciled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apnsReconciled' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apnsReconciled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1335:16: warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1333 | private static var apnsReconciled: Set<String> = []
1334 | /// How long a launch has to subscribe again before the topics it doesn't claim are unlinked.
1335 | static var reconcileDelay: TimeInterval = 30
| |- warning: static property 'reconcileDelay' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'reconcileDelay' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'reconcileDelay' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1336 |
1337 | private final class WeakPush {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1374:24: warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
1372 | }
1373 |
1374 | private static var appGroupWarned = false
| |- warning: static property 'appGroupWarned' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'appGroupWarned' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'appGroupWarned' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1375 |
1376 | /// Without the App Group the Notification Service Extension can't fetch, and the placeholder stays.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:717:17: warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
250 | /// // sub.update(background: true, title: "Messages")
251 | /// sub.unsubscribe()
252 | open class Push: Service {
| `- note: class 'Push' does not conform to the 'Sendable' protocol
253 | // Fixed keep-alive (PINGREQ interval) in seconds — not exposed as an option.
254 | private static let keepAliveSeconds: UInt16 = 60
:
715 | // Already disconnected (e.g. the broker dropped the connection); nothing to send.
716 | } catch {
717 | self?.surface(Push.describe(error))
| `- warning: capture of 'self' with non-sendable type 'Push?' in a '@Sendable' closure
718 | }
719 | do {
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:923:38: warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
921 | port: port,
922 | identifier: id,
923 | eventLoopGroupProvider: .createNew,
| `- warning: 'createNew' is deprecated: Please use `.shared(existingGroup)` or use the singleton via `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
924 | configuration: configuration
925 | )
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1214:21: warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
1212 | URLSession.shared.downloadTask(with: URLRequest(url: url, timeoutInterval: 10)) { location, response, _ in
1213 | guard let location, let fileExtension = attachmentExtension(url, mimeType: response?.mimeType) else {
1214 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '(UNNotificationAttachment?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
1215 | return
1216 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:45: warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated property 'delegate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:194:54: note: property declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
| `- note: property declared here
195 |
196 | - (void)hide:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:2185:38: warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2179 | }
2180 |
2181 | private static func applicationDelegate() -> NSObject? {
| `- note: add '@MainActor' to make static method 'applicationDelegate()' part of global actor 'MainActor'
2182 | #if os(iOS) || os(tvOS)
2183 | return UIApplication.shared.delegate as? NSObject
2184 | #elseif os(macOS)
2185 | return NSApplication.shared.delegate as? NSObject
| `- warning: main actor-isolated class property 'shared' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
2186 | #else
2187 | return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:193:61: note: class property declared here
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
| `- note: class property declared here
194 | @property (nullable, weak) id<NSApplicationDelegate> delegate;
195 |
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:20:20: warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | static let liveWindow: TimeInterval = 10
19 | static let pendingLifetime: TimeInterval = 30
20 | static var inServiceExtension = false
| |- warning: static property 'inServiceExtension' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'inServiceExtension' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'inServiceExtension' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | private static let prefix = "appwrite.push.shared"
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/PushServiceExtension.swift:57:20: warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
55 | }
56 |
57 | static var defaults: UserDefaults = appGroup.flatMap { UserDefaults(suiteName: $0) } ?? .standard
| |- warning: static property 'defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
58 |
59 | // MARK: Session
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1707:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1705 | let pushes = apnsLocked { apnsPushes.values.compactMap { $0.push } }
1706 | if message.wake {
1707 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1708 | var woke = false
1709 | for push in pushes {
:
1712 | }
1713 | }
1714 | completion?(woke)
| `- note: closure captures 'completion' which is accessible to code in the current task
1715 | }
1716 | return true
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1507:13: warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
1505 | }
1506 | for push in pushes where !push.backgroundTopics().isEmpty {
1507 | Task { await register(push, token: hex, topics: push.backgroundTopics()) }
| |- warning: sending value of non-Sendable type '() async -> ()' risks causing data races; this is an error in the Swift 6 language mode
| |- note: Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code
| `- note: access can happen concurrently
1508 | }
1509 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1472:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1470 | }
1471 | let scheduler = WeakPush(push)
1472 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1473 | try? await Task.sleep(nanoseconds: UInt64(reconcileDelay * 1_000_000_000))
1474 | await reconcile(userId: userId, targetId: targetId, fallback: scheduler.push)
| `- note: closure captures 'scheduler' which is accessible to code in the current task
1475 | }
1476 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1401:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1399 | }
1400 | if let token {
1401 | Task { await register(push, token: token, topics: topics) }
| | `- note: closure captures 'push' which is accessible to code in the current task
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1402 | }
1403 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1077:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1075 | private func inBackground(_ operation: @escaping () async throws -> Void) {
1076 | let generation = sync.sync { closeGeneration }
1077 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1078 | do {
1079 | try await operation()
| `- note: closure captures non-Sendable 'operation'
1080 | } catch {
1081 | guard let self, !self.sync.sync(execute: { self.closing || self.closeGeneration != generation }) else { return }
| `- note: closure captures non-Sendable 'self'
1082 | self.surface(Push.describe(error))
1083 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:1414:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1412 | let targetId = Push.targetId(for: userId)
1413 | let linked = apnsLocked { apnsLinked[targetId] ?? [] }
1414 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1415 | for topic in topics where linked.contains(topic) {
1416 | await unlink(push, targetId: targetId, topic: topic)
| `- note: closure captures 'push' which is accessible to code in the current task
1417 | }
1418 | // The target is shared by every Push of the user, so check again just before deleting it.
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:766:32: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
764 | self.connectedKey = key
765 | let epoch = self.connectionEpoch
766 | let created = Task { () throws -> MQTTClient in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
767 | do {
768 | let client = try await self.open()
| `- note: closure captures 'self' which is accessible to code in the current task
769 | let current = self.sync.sync { () -> Bool in
770 | guard self.connectionEpoch == epoch else { return false }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Push.swift:997:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
995 | }
996 | guard let client else { return }
997 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
998 | await reconnectLoop(client)
| `- note: closure captures 'self' which is accessible to code in the current task
999 | sync.sync { self.reconnecting = false }
1000 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:63:30: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | private func startHeartbeat() {
62 | stopHeartbeat()
63 | heartbeatTask = Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | while !Task.isCancelled {
66 | if let client = socketClient, client.isConnected {
| `- note: closure captures 'self' which is accessible to code in the current task
67 | client.send(text: #"{"type": "ping"}"#)
68 | }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:101:51: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
99 | return existing
100 | }
101 | let newTask = Task<Void, Swift.Error> { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
102 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
103 | defer {
104 | self.connectSync.sync { self.socketCreationTask = nil }
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:349:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
347 | }
348 | if needsSocket {
349 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
350 | do {
351 | try await self?.createSocket()
| `- note: closure captures 'self' which is accessible to code in the current task
352 | } catch {
353 | Realtime.logDiagnostic("Failed to open realtime socket for presence: \(error)")
/Users/admin/builder/spi-builder-workspace/Sources/Appwrite/Services/Realtime.swift:614:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
612 | Realtime.logDiagnostic("Realtime disconnected. Re-connecting in \(timeout / 1000) seconds.")
613 |
614 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
615 | try? await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000))
616 |
617 | guard let self = self else { return }
| `- note: closure captures 'self' which is accessible to code in the current task
618 | self.reconnectAttempts += 1
619 |
Build complete! (88.25s)
warning: 'spi-builder-workspace': /Users/admin/builder/spi-builder-workspace/Package.swift:5:15: warning: 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' is deprecated: replaced by 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)'
3 | import PackageDescription
4 |
5 | let package = Package(
| |- warning: 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' is deprecated: replaced by 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)'
| `- note: use 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)' instead
6 | name: "Appwrite",
7 | platforms: [
Fetching https://github.com/swift-server-community/mqtt-nio.git
Fetching https://github.com/apple/swift-nio.git from cache
Fetching https://github.com/apple/swift-distributed-tracing.git
Fetching https://github.com/swift-server/async-http-client.git from cache
[1/6697] Fetching swift-distributed-tracing
[68/19130] Fetching swift-distributed-tracing, mqtt-nio
Fetched https://github.com/apple/swift-distributed-tracing.git from cache (3.72s)
Fetched https://github.com/swift-server-community/mqtt-nio.git from cache (3.72s)
Fetched https://github.com/swift-server/async-http-client.git from cache (3.76s)
Fetched https://github.com/apple/swift-nio.git from cache (3.88s)
Computing version for https://github.com/swift-server-community/mqtt-nio.git
Computed https://github.com/swift-server-community/mqtt-nio.git at 2.13.0 (7.46s)
Fetching https://github.com/apple/swift-log.git from cache
Fetching https://github.com/apple/swift-nio-ssl.git from cache
Fetching https://github.com/apple/swift-atomics.git from cache
Fetching https://github.com/apple/swift-nio-transport-services.git from cache
Fetched https://github.com/apple/swift-log.git from cache (1.38s)
Fetched https://github.com/apple/swift-atomics.git from cache (1.56s)
Fetched https://github.com/apple/swift-nio-transport-services.git from cache (1.56s)
Fetched https://github.com/apple/swift-nio-ssl.git from cache (1.58s)
Computing version for https://github.com/apple/swift-nio.git
Computed https://github.com/apple/swift-nio.git at 2.104.0 (2.32s)
Fetching https://github.com/apple/swift-collections.git from cache
Fetching https://github.com/apple/swift-system.git from cache
Fetched https://github.com/apple/swift-system.git from cache (1.55s)
Fetched https://github.com/apple/swift-collections.git from cache (2.91s)
Computing version for https://github.com/swift-server/async-http-client.git
Computed https://github.com/swift-server/async-http-client.git at 1.36.2 (3.46s)
Fetching https://github.com/apple/swift-algorithms.git from cache
Fetching https://github.com/apple/swift-nio-http2.git from cache
Fetching https://github.com/apple/swift-nio-extras.git from cache
Fetched https://github.com/apple/swift-algorithms.git from cache (1.29s)
Fetched https://github.com/apple/swift-nio-extras.git from cache (1.30s)
Fetched https://github.com/apple/swift-nio-http2.git from cache (1.30s)
Computing version for https://github.com/apple/swift-atomics.git
Computed https://github.com/apple/swift-atomics.git at 1.3.1 (1.83s)
Computing version for https://github.com/apple/swift-algorithms.git
Computed https://github.com/apple/swift-algorithms.git at 1.2.1 (0.59s)
Fetching https://github.com/apple/swift-numerics.git from cache
Fetched https://github.com/apple/swift-numerics.git from cache (1.11s)
Computing version for https://github.com/apple/swift-distributed-tracing.git
Computed https://github.com/apple/swift-distributed-tracing.git at 1.5.0 (1.63s)
Fetching https://github.com/apple/swift-service-context.git
[1/1546] Fetching swift-service-context
Fetched https://github.com/apple/swift-service-context.git from cache (1.15s)
Computing version for https://github.com/apple/swift-numerics.git
Computed https://github.com/apple/swift-numerics.git at 1.1.1 (1.66s)
Computing version for https://github.com/apple/swift-nio-transport-services.git
Computed https://github.com/apple/swift-nio-transport-services.git at 1.28.0 (0.54s)
Computing version for https://github.com/apple/swift-service-context.git
Computed https://github.com/apple/swift-service-context.git at 1.3.0 (0.46s)
Computing version for https://github.com/apple/swift-nio-http2.git
Computed https://github.com/apple/swift-nio-http2.git at 1.46.0 (0.51s)
Computing version for https://github.com/apple/swift-nio-ssl.git
Computed https://github.com/apple/swift-nio-ssl.git at 2.37.5 (0.55s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.15.1 (0.47s)
Computing version for https://github.com/apple/swift-system.git
Computed https://github.com/apple/swift-system.git at 1.8.1 (0.54s)
Computing version for https://github.com/apple/swift-nio-extras.git
Computed https://github.com/apple/swift-nio-extras.git at 1.35.2 (2.59s)
Fetching https://github.com/swift-server/swift-service-lifecycle.git
Fetching https://github.com/apple/swift-async-algorithms.git
Fetching https://github.com/apple/swift-http-types.git from cache
Fetching https://github.com/apple/swift-asn1.git from cache
Fetching https://github.com/apple/swift-certificates.git
Fetching https://github.com/apple/swift-http-structured-headers.git from cache
[1/2892] Fetching swift-service-lifecycle
[2/10499] Fetching swift-service-lifecycle, swift-certificates
[3/17324] Fetching swift-service-lifecycle, swift-certificates, swift-async-algorithms
Fetched https://github.com/apple/swift-http-types.git from cache (1.05s)
Fetched https://github.com/apple/swift-certificates.git from cache (1.55s)
Fetched https://github.com/apple/swift-http-structured-headers.git from cache (1.57s)
Fetched https://github.com/swift-server/swift-service-lifecycle.git from cache (1.58s)
Fetched https://github.com/apple/swift-async-algorithms.git from cache (1.59s)
Fetched https://github.com/apple/swift-asn1.git from cache (1.58s)
Computing version for https://github.com/apple/swift-http-structured-headers.git
Computed https://github.com/apple/swift-http-structured-headers.git at 1.7.0 (2.12s)
Computing version for https://github.com/apple/swift-http-types.git
Computed https://github.com/apple/swift-http-types.git at 1.8.0 (0.55s)
Computing version for https://github.com/swift-server/swift-service-lifecycle.git
Computed https://github.com/swift-server/swift-service-lifecycle.git at 2.12.1 (0.48s)
Computing version for https://github.com/apple/swift-async-algorithms.git
Computed https://github.com/apple/swift-async-algorithms.git at 1.1.7 (0.55s)
Computing version for https://github.com/apple/swift-asn1.git
Computed https://github.com/apple/swift-asn1.git at 1.7.3 (0.59s)
Computing version for https://github.com/apple/swift-certificates.git
Computed https://github.com/apple/swift-certificates.git at 1.21.1 (0.61s)
Fetching https://github.com/apple/swift-crypto.git from cache
Fetched https://github.com/apple/swift-crypto.git from cache (2.12s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.6.0 (0.55s)
Computing version for https://github.com/apple/swift-crypto.git
Computed https://github.com/apple/swift-crypto.git at 4.5.2 (1.09s)
Creating working copy for https://github.com/apple/swift-asn1.git
Working copy of https://github.com/apple/swift-asn1.git resolved at 1.7.3
Creating working copy for https://github.com/apple/swift-nio-transport-services.git
Working copy of https://github.com/apple/swift-nio-transport-services.git resolved at 1.28.0
Creating working copy for https://github.com/apple/swift-log.git
Working copy of https://github.com/apple/swift-log.git resolved at 1.15.1
Creating working copy for https://github.com/swift-server/swift-service-lifecycle.git
Working copy of https://github.com/swift-server/swift-service-lifecycle.git resolved at 2.12.1
Creating working copy for https://github.com/apple/swift-system.git
Working copy of https://github.com/apple/swift-system.git resolved at 1.8.1
Creating working copy for https://github.com/apple/swift-crypto.git
Working copy of https://github.com/apple/swift-crypto.git resolved at 4.5.2
Creating working copy for https://github.com/apple/swift-http-structured-headers.git
Working copy of https://github.com/apple/swift-http-structured-headers.git resolved at 1.7.0
Creating working copy for https://github.com/swift-server/async-http-client.git
Working copy of https://github.com/swift-server/async-http-client.git resolved at 1.36.2
Creating working copy for https://github.com/apple/swift-certificates.git
Working copy of https://github.com/apple/swift-certificates.git resolved at 1.21.1
Creating working copy for https://github.com/apple/swift-atomics.git
Working copy of https://github.com/apple/swift-atomics.git resolved at 1.3.1
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.6.0
Creating working copy for https://github.com/apple/swift-nio-http2.git
Working copy of https://github.com/apple/swift-nio-http2.git resolved at 1.46.0
Creating working copy for https://github.com/apple/swift-algorithms.git
Working copy of https://github.com/apple/swift-algorithms.git resolved at 1.2.1
Creating working copy for https://github.com/apple/swift-nio.git
Working copy of https://github.com/apple/swift-nio.git resolved at 2.104.0
Creating working copy for https://github.com/swift-server-community/mqtt-nio.git
Working copy of https://github.com/swift-server-community/mqtt-nio.git resolved at 2.13.0
Creating working copy for https://github.com/apple/swift-async-algorithms.git
Working copy of https://github.com/apple/swift-async-algorithms.git resolved at 1.1.7
Creating working copy for https://github.com/apple/swift-nio-extras.git
Working copy of https://github.com/apple/swift-nio-extras.git resolved at 1.35.2
Creating working copy for https://github.com/apple/swift-numerics.git
Working copy of https://github.com/apple/swift-numerics.git resolved at 1.1.1
Creating working copy for https://github.com/apple/swift-http-types.git
Working copy of https://github.com/apple/swift-http-types.git resolved at 1.8.0
Creating working copy for https://github.com/apple/swift-distributed-tracing.git
Working copy of https://github.com/apple/swift-distributed-tracing.git resolved at 1.5.0
Creating working copy for https://github.com/apple/swift-nio-ssl.git
Working copy of https://github.com/apple/swift-nio-ssl.git resolved at 2.37.5
Creating working copy for https://github.com/apple/swift-service-context.git
Working copy of https://github.com/apple/swift-service-context.git resolved at 1.3.0
warning: 'spi-builder-workspace': dependency 'swift-distributed-tracing' is not used by any target
Build complete.
{
"dependencies" : [
{
"identity" : "async-http-client",
"requirement" : {
"range" : [
{
"lower_bound" : "1.36.2",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/swift-server/async-http-client.git"
},
{
"identity" : "swift-distributed-tracing",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "1.6.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-distributed-tracing.git"
},
{
"identity" : "swift-nio",
"requirement" : {
"range" : [
{
"lower_bound" : "2.104.0",
"upper_bound" : "3.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-nio.git"
},
{
"identity" : "mqtt-nio",
"requirement" : {
"range" : [
{
"lower_bound" : "2.13.0",
"upper_bound" : "3.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/swift-server-community/mqtt-nio.git"
}
],
"manifest_display_name" : "Appwrite",
"name" : "Appwrite",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "watchos",
"version" : "8.0"
},
{
"name" : "tvos",
"version" : "15.0"
}
],
"products" : [
{
"name" : "Appwrite",
"targets" : [
"Appwrite",
"AppwriteEnums",
"AppwriteModels",
"JSONCodable"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"swift_languages_versions" : [
"5"
],
"targets" : [
{
"c99name" : "JSONCodable",
"module_type" : "SwiftTarget",
"name" : "JSONCodable",
"path" : "Sources/JSONCodable",
"product_memberships" : [
"Appwrite"
],
"sources" : [
"Codable+JSON.swift"
],
"type" : "library"
},
{
"c99name" : "AppwriteTests",
"module_type" : "SwiftTarget",
"name" : "AppwriteTests",
"path" : "Tests/AppwriteTests",
"product_dependencies" : [
"NIOCore",
"NIOEmbedded",
"NIOWebSocket"
],
"sources" : [
"MessageHandlerTests.swift",
"PushTests.swift",
"Tests.swift",
"WebAuthComponentTests.swift"
],
"target_dependencies" : [
"Appwrite"
],
"type" : "test"
},
{
"c99name" : "AppwriteModels",
"module_type" : "SwiftTarget",
"name" : "AppwriteModels",
"path" : "Sources/AppwriteModels",
"product_memberships" : [
"Appwrite"
],
"sources" : [
"Account.swift",
"AlgoArgon2.swift",
"AlgoBcrypt.swift",
"AlgoMd5.swift",
"AlgoPhpass.swift",
"AlgoScrypt.swift",
"AlgoScryptModified.swift",
"AlgoSha.swift",
"App.swift",
"AppInstallation.swift",
"AppInstallationList.swift",
"AppKey.swift",
"AppKeyList.swift",
"AppScope.swift",
"AppScopeList.swift",
"AppSecret.swift",
"AppSecretList.swift",
"AppSecretPlaintext.swift",
"AppsList.swift",
"Continent.swift",
"ContinentList.swift",
"Country.swift",
"CountryList.swift",
"Currency.swift",
"CurrencyList.swift",
"Document.swift",
"DocumentList.swift",
"Execution.swift",
"ExecutionList.swift",
"File.swift",
"FileList.swift",
"Headers.swift",
"Identity.swift",
"IdentityList.swift",
"Jwt.swift",
"Language.swift",
"LanguageList.swift",
"Locale.swift",
"LocaleCode.swift",
"LocaleCodeList.swift",
"Membership.swift",
"MembershipList.swift",
"MfaChallenge.swift",
"MfaFactors.swift",
"MfaRecoveryCodes.swift",
"MfaType.swift",
"Oauth2Approve.swift",
"Oauth2Authorize.swift",
"Oauth2Consent.swift",
"Oauth2ConsentList.swift",
"Oauth2ConsentToken.swift",
"Oauth2ConsentTokenList.swift",
"Oauth2DeviceAuthorization.swift",
"Oauth2Grant.swift",
"Oauth2Organization.swift",
"Oauth2OrganizationList.swift",
"Oauth2PAR.swift",
"Oauth2Project.swift",
"Oauth2ProjectList.swift",
"Oauth2Reject.swift",
"Oauth2Token.swift",
"Passkey.swift",
"PasskeyChallenge.swift",
"PasskeyList.swift",
"Phone.swift",
"PhoneList.swift",
"Preferences.swift",
"Presence.swift",
"PresenceList.swift",
"Row.swift",
"RowList.swift",
"Session.swift",
"SessionList.swift",
"Subscriber.swift",
"Target.swift",
"Team.swift",
"TeamList.swift",
"Token.swift",
"TokenSecret.swift",
"Transaction.swift",
"TransactionList.swift",
"User.swift"
],
"target_dependencies" : [
"AppwriteEnums",
"JSONCodable"
],
"type" : "library"
},
{
"c99name" : "AppwriteEnums",
"module_type" : "SwiftTarget",
"name" : "AppwriteEnums",
"path" : "Sources/AppwriteEnums",
"product_memberships" : [
"Appwrite"
],
"sources" : [
"AuthenticationFactor.swift",
"AuthenticatorType.swift",
"Browser.swift",
"BrowserPermission.swift",
"BrowserTheme.swift",
"CreditCard.swift",
"ExecutionMethod.swift",
"ExecutionResourceType.swift",
"ExecutionStatus.swift",
"ExecutionTrigger.swift",
"Flag.swift",
"IdTokenProvider.swift",
"ImageFormat.swift",
"ImageGravity.swift",
"OAuthProvider.swift",
"Timezone.swift"
],
"type" : "library"
},
{
"c99name" : "Appwrite",
"module_type" : "SwiftTarget",
"name" : "Appwrite",
"path" : "Sources/Appwrite",
"product_dependencies" : [
"AsyncHTTPClient",
"NIOWebSocket",
"NIOCore",
"MQTTNIO"
],
"product_memberships" : [
"Appwrite"
],
"sources" : [
"Channel.swift",
"Client.swift",
"DeviceInfo/Linux/LinuxDeviceInfo.swift",
"DeviceInfo/OSDeviceInfo.swift",
"DeviceInfo/Windows/WindowsDeviceInfo.swift",
"DeviceInfo/iOS/IOSDeviceInfo.swift",
"DeviceInfo/iOS/UIDevice+ModelName.swift",
"DeviceInfo/macOS/CwlSysCtl.swift",
"DeviceInfo/macOS/MacOSDeviceInfo.swift",
"DeviceInfo/watchOS/WKInterfaceDevice+ModelName.swift",
"DeviceInfo/watchOS/WatchOSDeviceInfo.swift",
"Extensions/Cookie+Codable.swift",
"Extensions/HTTPClientRequest+Cookies.swift",
"Extensions/String+MimeTypes.swift",
"ID.swift",
"Models/AppwriteError.swift",
"Models/InputFile.swift",
"Models/RealtimeModels.swift",
"Models/UploadProgress.swift",
"OAuth/View+OAuth.swift",
"OAuth/WebAuthComponent.swift",
"Operator.swift",
"PackageInfo/Apple/PackageInfo+Apple.swift",
"PackageInfo/Linux/PackageInfo+Linux.swift",
"PackageInfo/OSPackageInfo.swift",
"PackageInfo/PackageInfo.swift",
"PackageInfo/Windows/PackageInfo+Windows.swift",
"Permission.swift",
"Query.swift",
"Query/Builder.swift",
"Role.swift",
"Services/Account.swift",
"Services/Analytics.swift",
"Services/Apps.swift",
"Services/Avatars.swift",
"Services/Databases.swift",
"Services/DocumentsDB.swift",
"Services/Functions.swift",
"Services/Graphql.swift",
"Services/Locale.swift",
"Services/Messaging.swift",
"Services/Oauth2.swift",
"Services/Organization.swift",
"Services/Presences.swift",
"Services/Push.swift",
"Services/PushServiceExtension.swift",
"Services/Realtime.swift",
"Services/Service.swift",
"Services/Storage.swift",
"Services/TablesDB.swift",
"Services/Teams.swift",
"Services/VectorsDB.swift",
"StreamingDelegate.swift",
"Topic.swift",
"WebSockets/HTTPHandler.swift",
"WebSockets/MessageHandler.swift",
"WebSockets/WebSocketClient.swift",
"WebSockets/WebSocketClientDelegate.swift",
"WebSockets/WebSocketClientError.swift"
],
"target_dependencies" : [
"AppwriteModels",
"AppwriteEnums",
"JSONCodable"
],
"type" : "library"
}
],
"tools_version" : "6.1"
}
warning: 'spi-builder-workspace': /Users/admin/builder/spi-builder-workspace/Package.swift:5:15: warning: 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' is deprecated: replaced by 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)'
3 | import PackageDescription
4 |
5 | let package = Package(
| |- warning: 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' is deprecated: replaced by 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)'
| `- note: use 'init(name:defaultLocalization:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageModes:cLanguageStandard:cxxLanguageStandard:)' instead
6 | name: "Appwrite",
7 | platforms: [
Done.