diff --git a/FlagsmithClient.podspec b/FlagsmithClient.podspec index 879861e..a3da26b 100644 --- a/FlagsmithClient.podspec +++ b/FlagsmithClient.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'FlagsmithClient' - s.version = '1.0.3' + s.version = '1.0.4' s.summary = 'iOS Client written in Swift for Flagsmith. Ship features with confidence using feature flags and remote config.' s.homepage = 'https://github.com/Flagsmith/flagsmith-ios-client' s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/FlagsmithClient/Classes/Trait.swift b/FlagsmithClient/Classes/Trait.swift index 69bed9b..738dd9a 100644 --- a/FlagsmithClient/Classes/Trait.swift +++ b/FlagsmithClient/Classes/Trait.swift @@ -37,14 +37,15 @@ public struct PostTrait: Codable { public let key: String public var value: String - var identity: IdentityStruct + public var identity: IdentityStruct - struct IdentityStruct: Codable { - var identifier: String + public struct IdentityStruct: Codable { + public var identifier: String - enum CodingKeys: String, CodingKey { + public enum CodingKeys: String, CodingKey { case identifier = "identifier" } + public init(identifier: String) { self.identifier = identifier } diff --git a/FlagsmithClient/Classes/UnknownTypeValue.swift b/FlagsmithClient/Classes/UnknownTypeValue.swift index 001f391..bc9e7c9 100644 --- a/FlagsmithClient/Classes/UnknownTypeValue.swift +++ b/FlagsmithClient/Classes/UnknownTypeValue.swift @@ -10,11 +10,11 @@ import Foundation /** An UnknownTypeValue represents a value which can have a variable type */ -enum UnknownTypeValue: Decodable { +public enum UnknownTypeValue: Decodable { case int(Int), string(String), float(Float) - init(from decoder: Decoder) throws { + public init(from decoder: Decoder) throws { if let int = try? decoder.singleValueContainer().decode(Int.self) { self = .int(int) return @@ -33,11 +33,11 @@ enum UnknownTypeValue: Decodable { throw UnknownTypeError.missingValue } - enum UnknownTypeError:Error { + public enum UnknownTypeError:Error { case missingValue } - var intValue: Int? { + public var intValue: Int? { switch self { case .int(let value): return value case .string(let value): return Int(value) @@ -45,7 +45,7 @@ enum UnknownTypeValue: Decodable { } } - var stringValue: String? { + public var stringValue: String? { switch self { case .int(let value): return String(value) case .string(let value): return value @@ -53,7 +53,7 @@ enum UnknownTypeValue: Decodable { } } - var floatValue: Float? { + public var floatValue: Float? { switch self { case .int(let value): return Float(value) case .string(let value): return Float(value)