Skip to content

Commit 90a68a7

Browse files
committed
bug fix
1 parent cb8bbec commit 90a68a7

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

SmartCodable.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
Pod::Spec.new do |s|
1414
s.name = 'SmartCodable'
15-
s.version = '6.0.7'
15+
s.version = '6.0.8'
1616
s.summary = 'Swift数据解析库'
1717

1818
s.homepage = 'https://github.com/iAmMccc/SmartCodable'

Sources/SmartCodable/Core/PropertyWrapper/SmartPublished.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
//
77

88
import Foundation
9+
#if canImport(Combine)
910
import SwiftUI
1011
import Combine
1112

1213

1314
/**
1415
A property wrapper that combines Combine's publishing functionality with Codable serialization.
15-
16+
1617
Key Features:
1718
- Simplifies property declaration with property wrapper syntax
1819
- Supports reactive programming through Combine publishers
@@ -120,13 +121,10 @@ extension SmartPublished: Codable {
120121
self.wrappedValue = value
121122
publisher = Publisher(wrappedValue)
122123
}
123-
124+
124125
public func encode(to encoder: Encoder) throws {
125126
var container = encoder.singleValueContainer()
126127
try container.encode(self.wrappedValue)
127128
}
128129
}
129-
130-
131-
132-
130+
#endif

0 commit comments

Comments
 (0)