Skip to content

add Sendable #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Auth/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
self.phone = phone
self.password = password
self.nonce = nonce
self.emailChangeToken = emailChangeToken

Check warning on line 504 in Sources/Auth/Types.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

'emailChangeToken' is deprecated: This is an old field, stop relying on it.

Check warning on line 504 in Sources/Auth/Types.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, MAC_CATALYST, 15.4)

'emailChangeToken' is deprecated: This is an old field, stop relying on it.

Check warning on line 504 in Sources/Auth/Types.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 15.4)

'emailChangeToken' is deprecated: This is an old field, stop relying on it.

Check warning on line 504 in Sources/Auth/Types.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, MACOS, 15.4)

'emailChangeToken' is deprecated: This is an old field, stop relying on it.

Check warning on line 504 in Sources/Auth/Types.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, MAC_CATALYST, 16.0)

'emailChangeToken' is deprecated: This is an old field, stop relying on it.

Check warning on line 504 in Sources/Auth/Types.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 15.4)

'emailChangeToken' is deprecated: This is an old field, stop relying on it.
self.data = data
}
}
Expand Down Expand Up @@ -619,7 +619,7 @@
}
}

public struct MFAChallengeParams: Encodable, Hashable {
public struct MFAChallengeParams: Encodable, Hashable, Sendable {
/// ID of the factor to be challenged. Returned in ``AuthMFA/enroll(params:)``.
public let factorId: String

Expand All @@ -632,7 +632,7 @@
}
}

public struct MFAVerifyParams: Encodable, Hashable {
public struct MFAVerifyParams: Encodable, Hashable, Sendable {
/// ID of the factor being verified. Returned in ``AuthMFA/enroll(params:)``.
public let factorId: String

Expand Down
6 changes: 3 additions & 3 deletions Sources/Realtime/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import Foundation

/// A collection of default values and behaviors used across the Client
public enum Defaults {
public enum Defaults: Sendable {
/// Default timeout when sending messages
public static let timeoutInterval: TimeInterval = 10.0

Expand All @@ -33,19 +33,19 @@
public static let heartbeatLeeway: DispatchTimeInterval = .milliseconds(10)

/// Default reconnect algorithm for the socket
public static let reconnectSteppedBackOff: (Int) -> TimeInterval = { tries in

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / Examples

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 36 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'reconnectSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
tries > 9 ? 5.0 : [0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.5, 1.0, 2.0][tries - 1]
}

/** Default rejoin algorithm for individual channels */
public static let rejoinSteppedBackOff: (Int) -> TimeInterval = { tries in

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / Examples

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 41 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'rejoinSteppedBackOff' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
tries > 3 ? 10 : [1, 2, 5][tries - 1]
}

public static let vsn = "2.0.0"

/// Default encode function, utilizing JSONSerialization.data
public static let encode: (Any) -> Data = { json in

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / Examples

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 48 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'encode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
try! JSONSerialization
.data(
withJSONObject: json,
Expand All @@ -54,7 +54,7 @@
}

/// Default decode function, utilizing JSONSerialization.jsonObject
public static let decode: (Data) -> Any? = { data in

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / Examples

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6

Check warning on line 57 in Sources/Realtime/Defaults.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

static property 'decode' is not concurrency-safe because it is not either conforming to 'Sendable' or isolated to a global actor; this is an error in Swift 6
guard
let json =
try? JSONSerialization
Expand All @@ -73,7 +73,7 @@

/// Represents the multiple states that a Channel can be in
/// throughout it's lifecycle.
public enum ChannelState: String {
public enum ChannelState: String, Sendable {
case closed
case errored
case joined
Expand All @@ -83,7 +83,7 @@

/// Represents the different events that can be sent through
/// a channel regarding a Channel's lifecycle.
public enum ChannelEvent {
public enum ChannelEvent: Sendable {
public static let join = "phx_join"
public static let leave = "phx_leave"
public static let close = "phx_close"
Expand Down
2 changes: 1 addition & 1 deletion Sources/Realtime/PhoenixTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

// ----------------------------------------------------------------------
/// Available `ReadyState`s of a `Transport` layer.
public enum PhoenixTransportReadyState {
public enum PhoenixTransportReadyState: Sendable {
/// The `Transport` is opening a connection to the server.
case connecting

Expand All @@ -137,7 +137,7 @@
/// `Transport` implementations. Or you can create your own implementation using
/// your own WebSocket library or implementation.
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / Examples

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode

Check warning on line 140 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

non-final class 'URLSessionTransport' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
/// The URL to connect to
let url: URL

Expand All @@ -145,7 +145,7 @@
let configuration: URLSessionConfiguration

/// The underling URLSession. Assigned during `connect()`
private var session: URLSession? = nil

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / Examples

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

Check warning on line 148 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

stored property 'session' of 'Sendable'-conforming class 'URLSessionTransport' is mutable; this is an error in the Swift 6 language mode

/// The ongoing task. Assigned during `connect()`
private var task: URLSessionWebSocketTask? = nil
Expand Down Expand Up @@ -201,7 +201,7 @@
var request = URLRequest(url: url)

for (key, value) in headers {
guard let value = value as? String else { continue }

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

conditional cast from 'String' to 'String' always succeeds

Check warning on line 204 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

conditional cast from 'String' to 'String' always succeeds
request.addValue(value, forHTTPHeaderField: key)
}

Expand Down Expand Up @@ -229,7 +229,7 @@

open func send(data: Data) {
Task {
try? await task?.send(.string(String(data: data, encoding: .utf8)!))

Check warning on line 232 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 232 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 232 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 232 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 232 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure
}
}

Expand Down Expand Up @@ -278,7 +278,7 @@
private func receive() {
Task {
do {
let result = try await task?.receive()

Check warning on line 281 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 281 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 281 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 281 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure

Check warning on line 281 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

capture of 'self' with non-sendable type 'URLSessionTransport' in a `@Sendable` closure
switch result {
case .data:
print("Data received. This method is unsupported by the Client")
Expand Down Expand Up @@ -310,7 +310,7 @@
// so inform the delegate that the Transport has closed abnormally. This will kick off
// the reconnect logic.
delegate?.onClose(
code: RealtimeClient.CloseCode.abnormal.rawValue, reason: error.localizedDescription

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 313 in Sources/Realtime/PhoenixTransport.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md
)
}
}
4 changes: 2 additions & 2 deletions Sources/Realtime/Presence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public final class Presence {
///
/// let options = Options(events: [.state: "my_state", .diff: "my_diff"])
/// let presence = Presence(channel, opts: options)
public struct Options {
public struct Options: Sendable {
let events: [Events: String]

/// Default set of Options used when creating Presence. Uses the
Expand All @@ -124,7 +124,7 @@ public final class Presence {
}

/// Presense Events
public enum Events: String {
public enum Events: String, Sendable {
case state
case diff
}
Expand Down
10 changes: 5 additions & 5 deletions Sources/Realtime/RealtimeChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
let id: String?
}

public struct ChannelFilter {
public struct ChannelFilter: Sendable {
public var event: String?
public var schema: String?
public let table: String?
Expand All @@ -60,18 +60,18 @@
}
}

public enum ChannelResponse {
public enum ChannelResponse: Sendable {
case ok, timedOut, error
}

public enum RealtimeListenTypes: String {
public enum RealtimeListenTypes: String, Sendable {
case postgresChanges = "postgres_changes"
case broadcast
case presence
}

/// Represents the broadcast and presence options for a channel.
public struct RealtimeChannelOptions {
public struct RealtimeChannelOptions: Sendable {
/// Used to track presence payload across clients. Must be unique per client. If `nil`, the server
/// will generate one.
var presenceKey: String?
Expand Down Expand Up @@ -106,7 +106,7 @@
}
}

public enum RealtimeSubscribeStates {
public enum RealtimeSubscribeStates: Sendable {
case subscribed
case timedOut
case closed
Expand Down Expand Up @@ -1004,7 +1004,7 @@
// MARK: - Public API

// ----------------------------------------------------------------------
extension RealtimeChannel {

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / Examples

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, IOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, TVOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 15.4)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (TVOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1007 in Sources/Realtime/RealtimeChannel.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

'RealtimeChannel' is deprecated: Use new RealtimeChannelV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md
/// - return: True if the RealtimeChannel has been closed
public var isClosed: Bool {
state == .closed
Expand Down
2 changes: 1 addition & 1 deletion Sources/Realtime/RealtimeClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,8 @@
// MARK: - Close Codes

// ----------------------------------------------------------------------
extension RealtimeClient {

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / Examples

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (IOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MACOS, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (MAC_CATALYST, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (test, WATCHOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 16.0)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md

Check warning on line 1009 in Sources/Realtime/RealtimeClient.swift

View workflow job for this annotation

GitHub Actions / xcodebuild (WATCHOS, 15.4)

'RealtimeClient' is deprecated: Use new RealtimeClientV2 class instead. See migration guide: https://github.com/supabase-community/supabase-swift/blob/main/docs/migrations/RealtimeV2%20Migration%20Guide.md
public enum CloseCode: Int {
public enum CloseCode: Int, Sendable {
case abnormal = 999

case normal = 1000
Expand Down
2 changes: 1 addition & 1 deletion Sources/Realtime/RealtimeMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Foundation
import Helpers

/// Data that is received from the Server.
public struct RealtimeMessage {
public struct RealtimeMessage: Sendable {
/// Reference number. Empty if missing
public let ref: String

Expand Down
2 changes: 1 addition & 1 deletion Sources/Realtime/V2/RealtimeMessageV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public struct RealtimeMessageV2: Hashable, Codable, Sendable {
}
}

public enum EventType {
public enum EventType: Sendable {
case system
case postgresChanges
case broadcast
Expand Down
2 changes: 1 addition & 1 deletion Sources/Storage/Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ extension StorageFileApi {
deprecated,
message: "File was deprecated and it isn't used in the package anymore, if you're using it on your application, consider replacing it as it will be removed on the next major release."
)
public struct File: Hashable, Equatable {
public struct File: Hashable, Equatable, Sendable {
public var name: String
public var data: Data
public var fileName: String?
Expand Down
Loading