sparkling-method 2.0.0-rc.1 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,9 +13,7 @@ extension MethodPipe {
|
|
|
13
13
|
|
|
14
14
|
let resultModelType = method.resultModelClass
|
|
15
15
|
let resultBlk: PipeMethod.CompletionBlock = { status, result in
|
|
16
|
-
// Safely check result type
|
|
17
16
|
if let result = result, type(of: result) != EmptyMethodModel.self {
|
|
18
|
-
// Using Swift type checking
|
|
19
17
|
let resultActualType = type(of: result)
|
|
20
18
|
if resultModelType != resultActualType && resultModelType != EmptyMethodModel.self {
|
|
21
19
|
completion?(.resultModelTypeWrong(message: "\(type(of: method).methodName()).Result type mismatch: expected \(resultModelType),got \(resultActualType)"), nil)
|
|
@@ -55,7 +53,6 @@ extension MethodPipe {
|
|
|
55
53
|
|
|
56
54
|
var paramModel: MethodModel?
|
|
57
55
|
do {
|
|
58
|
-
// Safely call from method
|
|
59
56
|
if let methodModelType = paramsModelType as? MethodModel.Type {
|
|
60
57
|
paramModel = try methodModelType.from(dict: params)
|
|
61
58
|
} else {
|
|
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
:ios => '12.0'
|
|
13
13
|
}
|
|
14
14
|
s.swift_version = '5.10'
|
|
15
|
-
s.source = { git: 'https://github.com/tiktok/sparkling.git' }
|
|
15
|
+
s.source = { git: 'https://github.com/tiktok/sparkling.git', tag: s.version.to_s }
|
|
16
16
|
s.static_framework = true
|
|
17
17
|
|
|
18
18
|
s.pod_target_xcconfig = {
|