diff --git a/FlagsmithClient/Classes/Feature.swift b/FlagsmithClient/Classes/Feature.swift index 1c0ce75..446bb4f 100644 --- a/FlagsmithClient/Classes/Feature.swift +++ b/FlagsmithClient/Classes/Feature.swift @@ -10,7 +10,7 @@ import Foundation /** A Feature represents a flag or remote configuration value on the server. */ -public struct Feature: Codable { +public struct Feature: Codable, Sendable { enum CodingKeys: String, CodingKey { case name case type diff --git a/FlagsmithClient/Classes/Flag.swift b/FlagsmithClient/Classes/Flag.swift index 1929beb..b9a9ebc 100644 --- a/FlagsmithClient/Classes/Flag.swift +++ b/FlagsmithClient/Classes/Flag.swift @@ -10,7 +10,7 @@ import Foundation /** A Flag represents a feature flag on the server. */ -public struct Flag: Codable { +public struct Flag: Codable, Sendable { enum CodingKeys: String, CodingKey { case feature case value = "feature_state_value" diff --git a/FlagsmithClient/Classes/Flagsmith+Concurrency.swift b/FlagsmithClient/Classes/Flagsmith+Concurrency.swift index 0bd2dbf..0e0c2f1 100644 --- a/FlagsmithClient/Classes/Flagsmith+Concurrency.swift +++ b/FlagsmithClient/Classes/Flagsmith+Concurrency.swift @@ -7,7 +7,6 @@ import Foundation -#if swift(>=5.5) @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) public extension Flagsmith { /// Get all feature flags (flags and remote config) optionally for a specific identity @@ -180,4 +179,3 @@ public extension Flagsmith { }) } } -#endif diff --git a/FlagsmithClient/Classes/FlagsmithError.swift b/FlagsmithClient/Classes/FlagsmithError.swift index 8f5fc43..fda9675 100644 --- a/FlagsmithClient/Classes/FlagsmithError.swift +++ b/FlagsmithClient/Classes/FlagsmithError.swift @@ -8,7 +8,7 @@ import Foundation /// All errors that can be encountered while using the **FlagsmithClient** -public enum FlagsmithError: LocalizedError { +public enum FlagsmithError: LocalizedError, Sendable { /// API Key was not provided or invalid. case apiKey /// API URL was invalid. diff --git a/FlagsmithClient/Classes/Identity.swift b/FlagsmithClient/Classes/Identity.swift index 00441cc..1dfbce3 100644 --- a/FlagsmithClient/Classes/Identity.swift +++ b/FlagsmithClient/Classes/Identity.swift @@ -10,7 +10,7 @@ import Foundation /** An Identity represents a user stored on the server. */ -public struct Identity: Decodable { +public struct Identity: Decodable, Sendable { enum CodingKeys: String, CodingKey { case flags case traits diff --git a/FlagsmithClient/Classes/Trait.swift b/FlagsmithClient/Classes/Trait.swift index 8468f2b..85e9ec6 100644 --- a/FlagsmithClient/Classes/Trait.swift +++ b/FlagsmithClient/Classes/Trait.swift @@ -10,7 +10,7 @@ import Foundation /** A Trait represents a value stored against an Identity (user) on the server. */ -public struct Trait: Codable { +public struct Trait: Codable, Sendable { enum CodingKeys: String, CodingKey { case key = "trait_key" case value = "trait_value" diff --git a/FlagsmithClient/Classes/Traits.swift b/FlagsmithClient/Classes/Traits.swift index 11a1a95..a6e41cb 100644 --- a/FlagsmithClient/Classes/Traits.swift +++ b/FlagsmithClient/Classes/Traits.swift @@ -10,7 +10,7 @@ import Foundation /** A Traits object represent a collection of different `Trait`s stored against the same Identity (user) on the server. */ -public struct Traits: Codable { +public struct Traits: Codable, Sendable { public let traits: [Trait] public let identifier: String? } diff --git a/FlagsmithClient/Classes/TypedValue.swift b/FlagsmithClient/Classes/TypedValue.swift index dd95f80..5bd5794 100644 --- a/FlagsmithClient/Classes/TypedValue.swift +++ b/FlagsmithClient/Classes/TypedValue.swift @@ -8,7 +8,7 @@ import Foundation /// A value associated to a `Flag` or `Trait` -public enum TypedValue: Equatable { +public enum TypedValue: Equatable, Sendable { case bool(Bool) case float(Float) case int(Int) diff --git a/FlagsmithClient/Classes/UnknownTypeValue.swift b/FlagsmithClient/Classes/UnknownTypeValue.swift index 0ed1d7e..7ff2ed0 100644 --- a/FlagsmithClient/Classes/UnknownTypeValue.swift +++ b/FlagsmithClient/Classes/UnknownTypeValue.swift @@ -11,7 +11,7 @@ import Foundation An UnknownTypeValue represents a value which can have a variable type */ @available(*, deprecated, renamed: "TypedValue") -public enum UnknownTypeValue: Decodable { +public enum UnknownTypeValue: Decodable, Sendable { case int(Int), string(String), float(Float), null diff --git a/Package.swift b/Package.swift index e37a349..84a8f31 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.5 import PackageDescription