Skip to content

Commit

Permalink
fix: pod lib error
Browse files Browse the repository at this point in the history
  • Loading branch information
iwill committed Jun 7, 2024
1 parent d3a43f4 commit 3735bd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ExCodable.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "ExCodable"
# export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
s.version = ENV["LIB_VERSION"] || "1.0.0-rc01"
s.version = ENV["LIB_VERSION"] || "1.0.0-rc02"
s.summary = "Key-Mapping Extensions for Swift Codable"
# s.description = "Key-Mapping Extensions for Swift Codable."
s.homepage = "https://github.com/iwill/ExCodable"
Expand Down
2 changes: 2 additions & 0 deletions Sources/ExCodable/ExCodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ fileprivate extension KeyedDecodingContainer {
else if let double = try? decodeIfPresent(Double.self, forKey: codingKey) { return String(describing: double) as? T } // include Float
}

#if os(iOS) || os(tvOS)
if #available(iOS 14.0, tvOS 14.0, macOS 11.0, watchOS 7.0, *) {
if type is Float16.Type {
if let int64 = try? decodeIfPresent(Int64.self, forKey: codingKey) { return Float16(int64) as? T } // include all Int types
Expand All @@ -474,6 +475,7 @@ fileprivate extension KeyedDecodingContainer {
// else if let string = try? decodeIfPresent(String.self, forKey: codingKey), let value = Float96(string) { return value as? T }
// }
}
#endif

// specific converter for type `T`, via `extension T: ExCodableDecodingTypeConverter`
if let selfConverter,
Expand Down

0 comments on commit 3735bd2

Please sign in to comment.