Skip to content
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

added Sendable conformances, bump swift tools version to 5.5 #37

Merged
merged 1 commit into from
Oct 9, 2023
Merged
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
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Feature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Flag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions FlagsmithClient/Classes/Flagsmith+Concurrency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -180,4 +179,3 @@ public extension Flagsmith {
})
}
}
#endif
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/FlagsmithError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Identity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Trait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Traits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
}
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/TypedValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/UnknownTypeValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.5

import PackageDescription

Expand Down