Skip to content

Commit f7ccb66

Browse files
committed
协议名 SmartCodable 改为 SmartCodableX,防止打包framework命名冲突(modude.name 和 协议名 都是 SmartCodable)
1 parent d018e76 commit f7ccb66

98 files changed

Lines changed: 210 additions & 209 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Example/SmartCodable/1231231.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import SwiftUI
1111
import Combine
1212
import SmartCodable
1313

14-
class MyModel: ObservableObject, SmartCodable {
14+
class MyModel: ObservableObject, SmartCodableX {
1515
required init() {
1616

1717
}

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_10ViewController.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extension Introduce_10ViewController {
3737
print(models)
3838
}
3939

40-
struct Family: SmartCodable {
40+
struct Family: SmartCodableX {
4141

4242
var name: String?
4343
var id: String?
@@ -56,7 +56,7 @@ extension Introduce_10ViewController {
5656
print(models)
5757
}
5858

59-
struct Home: SmartCodable {
59+
struct Home: SmartCodableX {
6060

6161
@SmartAny
6262
var arr1: [Any]?
@@ -207,36 +207,36 @@ extension Introduce_10ViewController {
207207

208208

209209

210-
struct PathModel: SmartCodable {
210+
struct PathModel: SmartCodableX {
211211
var name: String?
212212
var age: Int?
213213
}
214214

215-
struct NestedArrayModel: SmartCodable {
215+
struct NestedArrayModel: SmartCodableX {
216216
var name: String?
217217
var friends: [Friend]?
218218

219-
struct Friend: SmartCodable {
219+
struct Friend: SmartCodableX {
220220
var name: String = ""
221221
var age: Int = 0
222222
}
223223
}
224224

225-
struct PathArrayModel: SmartCodable {
225+
struct PathArrayModel: SmartCodableX {
226226
var name: [String]?
227227
}
228228

229-
struct Course: SmartCodable {
229+
struct Course: SmartCodableX {
230230
var code: String?
231231
var title: String?
232232
}
233233

234-
struct Department: SmartCodable {
234+
struct Department: SmartCodableX {
235235
var name: String?
236236
var courses: [Course]?
237237
}
238238

239-
struct School: SmartCodable {
239+
struct School: SmartCodableX {
240240
var name: String?
241241
var departments: [Department]?
242242
}

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_11ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Introduce_11ViewController: BaseCompatibilityViewController {
2727
// SmartUpdater.update(&model, from: dic2)
2828
smartPrint(value: model)
2929
}
30-
struct Model: SmartCodable {
30+
struct Model: SmartCodableX {
3131
var name: String = ""
3232
var age: Int = 0
3333
}

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_12ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ class Introduce_12ViewController: BaseViewController {
4848
}
4949

5050
// 定义 PublishedModel,并实现反序列化
51-
class PublishedModel: ObservableObject, SmartCodable {
51+
class PublishedModel: ObservableObject, SmartCodableX {
5252
required init() {}
5353

5454
@SmartPublished
5555
var name: ABC?
5656
}
5757

58-
struct ABC: SmartCodable {
58+
struct ABC: SmartCodableX {
5959
var a: String = ""
6060
}
6161

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_1ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ class Introduce_1ViewController: BaseViewController {
4949

5050

5151
extension Introduce_1ViewController {
52-
struct Model: SmartCodable {
52+
struct Model: SmartCodableX {
5353
var name: String = ""
5454
var two = SubModel()
5555
}
56-
struct SubModel: SmartCodable {
56+
struct SubModel: SmartCodableX {
5757
var name: String = ""
5858
}
5959
}

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_2ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Introduce_2ViewController: BaseViewController {
106106
}
107107

108108
extension Introduce_2ViewController {
109-
struct JsonToModel: SmartCodable {
109+
struct JsonToModel: SmartCodableX {
110110
var name: String = ""
111111
var className: String = ""
112112
var detail: JsonToModelDetail = JsonToModelDetail()
@@ -115,7 +115,7 @@ extension Introduce_2ViewController {
115115
init() { }
116116
}
117117

118-
struct JsonToModelDetail: SmartCodable {
118+
struct JsonToModelDetail: SmartCodableX {
119119
var detail: String = ""
120120

121121
init() { }

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_3ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Introduce_3ViewController: BaseViewController {
9999

100100

101101
extension Introduce_3ViewController {
102-
struct ArrayAndModels: SmartCodable {
102+
struct ArrayAndModels: SmartCodableX {
103103
var name: String = ""
104104
var className: String = ""
105105
var detail = ArrayAndModelsDetail()
@@ -108,7 +108,7 @@ extension Introduce_3ViewController {
108108
init() { }
109109
}
110110

111-
struct ArrayAndModelsDetail: SmartCodable {
111+
struct ArrayAndModelsDetail: SmartCodableX {
112112
var detail: String = ""
113113

114114
init() { }

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_4ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ class Introduce_4ViewController: BaseViewController {
4646

4747
extension Introduce_4ViewController {
4848

49-
struct BigModel: SmartCodable {
49+
struct BigModel: SmartCodableX {
5050
var subModel1: SubModel?
5151
var subModel2: SubModel = SubModel()
5252
var subList1: [SubModel]?
5353
var subList2: [SubModel] = []
5454
}
5555

56-
struct SubModel: SmartCodable {
56+
struct SubModel: SmartCodableX {
5757
var name: String = ""
5858
}
5959
}

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_5ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Introduce_5ViewController: BaseViewController {
7373
}
7474

7575
extension Introduce_5ViewController {
76-
struct AnyModel: SmartCodable {
76+
struct AnyModel: SmartCodableX {
7777
@SmartAny
7878
var sex: Any?
7979
@SmartAny

Example/SmartCodable/Smart/1.Introduce(使用介绍)/Introduce_6ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Introduce_6ViewController: BaseViewController {
3131

3232
extension Introduce_6ViewController {
3333

34-
struct Model: SmartCodable {
34+
struct Model: SmartCodableX {
3535
var name: String = "-"
3636
var nickName: String = "帅气的小伙"
3737
}

0 commit comments

Comments
 (0)