From 0904bfeeb5a9890ffc19d37dec14351a136a9c7b Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Tue, 24 Sep 2024 17:03:31 -0300 Subject: [PATCH] Remove Swift version check Missed this in 67f4563. --- .../AblyCocoaExtensions/Ably+Dependencies.swift | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Sources/AblyChat/AblyCocoaExtensions/Ably+Dependencies.swift b/Sources/AblyChat/AblyCocoaExtensions/Ably+Dependencies.swift index 81eeee92..b193a9fe 100644 --- a/Sources/AblyChat/AblyCocoaExtensions/Ably+Dependencies.swift +++ b/Sources/AblyChat/AblyCocoaExtensions/Ably+Dependencies.swift @@ -2,17 +2,9 @@ import Ably // TODO: remove "@unchecked Sendable" once https://github.com/ably/ably-cocoa/issues/1962 done -#if swift(>=6) - // This @retroactive is needed to silence the Swift 6 compiler error "extension declares a conformance of imported type 'ARTRealtimeChannels' to imported protocol 'Sendable'; this will not behave correctly if the owners of 'Ably' introduce this conformance in the future (…) add '@retroactive' to silence this warning". I don’t fully understand the implications of this but don’t really mind since both libraries are in our control. - extension ARTRealtime: RealtimeClientProtocol, @retroactive @unchecked Sendable {} +// This @retroactive is needed to silence the Swift 6 compiler error "extension declares a conformance of imported type 'ARTRealtimeChannels' to imported protocol 'Sendable'; this will not behave correctly if the owners of 'Ably' introduce this conformance in the future (…) add '@retroactive' to silence this warning". I don’t fully understand the implications of this but don’t really mind since both libraries are in our control. +extension ARTRealtime: RealtimeClientProtocol, @retroactive @unchecked Sendable {} - extension ARTRealtimeChannels: RealtimeChannelsProtocol, @retroactive @unchecked Sendable {} +extension ARTRealtimeChannels: RealtimeChannelsProtocol, @retroactive @unchecked Sendable {} - extension ARTRealtimeChannel: RealtimeChannelProtocol, @retroactive @unchecked Sendable {} -#else - extension ARTRealtime: RealtimeClientProtocol, @unchecked Sendable {} - - extension ARTRealtimeChannels: RealtimeChannelsProtocol, @unchecked Sendable {} - - extension ARTRealtimeChannel: RealtimeChannelProtocol, @unchecked Sendable {} -#endif +extension ARTRealtimeChannel: RealtimeChannelProtocol, @retroactive @unchecked Sendable {}