Add. Network extensions
This commit is contained in:
parent
3baa5deff9
commit
e858c8ad02
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "LeadKitAdditions"
|
||||
s.version = "0.0.21"
|
||||
s.version = "0.0.22"
|
||||
s.summary = "iOS framework with a bunch of tools for rapid development"
|
||||
s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions"
|
||||
s.license = "Apache License, Version 2.0"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
/* Begin PBXBuildFile section */
|
||||
0A08E37F1F2A13BF00F9AB62 /* CellTextFieldToolBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A08E37E1F2A13BF00F9AB62 /* CellTextFieldToolBar.swift */; };
|
||||
248389A288C0A6D7914F0546 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ED4A1B793EAA73C9E95969F /* Pods_LeadKitAdditions_LeadKitAdditions_iOS.framework */; };
|
||||
A6CFB8D91F5024A500A42CC2 /* Error+NetworkingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6CFB8D81F5024A500A42CC2 /* Error+NetworkingExtensions.swift */; };
|
||||
B326804BA6CC8B8BB136A46A /* Pods_LeadKitAdditions_LeadKitAdditions_iOS_Extensions.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFD5627139CAB27705F75C07 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS_Extensions.framework */; };
|
||||
CAE698E81E968820000394B0 /* LeadKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = CAE698E61E968820000394B0 /* LeadKitAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
ED0C34031F2906EC00FAE9FD /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0C33D31F2906EC00FAE9FD /* ApiResponse.swift */; };
|
||||
|
|
@ -90,6 +91,7 @@
|
|||
49738551AC648B0AFA74E57F /* Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS/Pods-LeadKitAdditions-LeadKitAdditions iOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
7B7F57C5E5275C4D8DC71992 /* Pods_LeadKitAdditions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeadKitAdditions.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9D549FA5A7579702358E07DF /* Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
A6CFB8D81F5024A500A42CC2 /* Error+NetworkingExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Error+NetworkingExtensions.swift"; sourceTree = "<group>"; };
|
||||
CAE698E31E968820000394B0 /* LeadKitAdditions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LeadKitAdditions.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
CAE698E61E968820000394B0 /* LeadKitAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LeadKitAdditions.h; sourceTree = "<group>"; };
|
||||
CFD5627139CAB27705F75C07 /* Pods_LeadKitAdditions_LeadKitAdditions_iOS_Extensions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeadKitAdditions_LeadKitAdditions_iOS_Extensions.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
|
@ -272,6 +274,7 @@
|
|||
ED0C33E71F2906EC00FAE9FD /* Observable+Extensions.swift */,
|
||||
ED0C33E81F2906EC00FAE9FD /* UIBarButtonItem+Extensions.swift */,
|
||||
ED0C33E91F2906EC00FAE9FD /* UserDefaults+UserService.swift */,
|
||||
A6CFB8D81F5024A500A42CC2 /* Error+NetworkingExtensions.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -478,13 +481,16 @@
|
|||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-LeadKitAdditions-LeadKitAdditions iOS Extensions-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
808FF5474C0E1574D405EFAF /* [CP] Copy Pods Resources */ = {
|
||||
|
|
@ -537,13 +543,16 @@
|
|||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-LeadKitAdditions-LeadKitAdditions iOS-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
ED69E7E91F2AD0E000C74895 /* Swiftlint */ = {
|
||||
|
|
@ -591,6 +600,7 @@
|
|||
ED0C34291F2906EC00FAE9FD /* CellFieldValidationProtocol.swift in Sources */,
|
||||
0A08E37F1F2A13BF00F9AB62 /* CellTextFieldToolBar.swift in Sources */,
|
||||
ED0C34031F2906EC00FAE9FD /* ApiResponse.swift in Sources */,
|
||||
A6CFB8D91F5024A500A42CC2 /* Error+NetworkingExtensions.swift in Sources */,
|
||||
ED0C34071F2906EC00FAE9FD /* LoadingBarButton.swift in Sources */,
|
||||
ED0C34251F2906EC00FAE9FD /* CellFieldMaskProtocol.swift in Sources */,
|
||||
ED0C34211F2906EC00FAE9FD /* UserDefaults+UserService.swift in Sources */,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ SPEC CHECKSUMS:
|
|||
InputMask: fe1da1c6bf39133d88c1f79c507bcb0bf7728d51
|
||||
KeychainAccess: a986406022dfc7c634c691ad3bec670cc6a32002
|
||||
LeadKit: a66ca7c85b3e33deb11b6544fa80f45c9f0044e4
|
||||
ObjectMapper: '042708195cc46c20871cbcbec0453826398273fd'
|
||||
ObjectMapper: 042708195cc46c20871cbcbec0453826398273fd
|
||||
RxAlamofire: bc53604b29fd2d220cfaa490c736cc4500819f34
|
||||
RxCocoa: d14ef6b6029e1ddc6e966508c09289090de68ff9
|
||||
RxSwift: 3789a1af753002a14edecdb698a2424624296a9c
|
||||
|
|
@ -60,4 +60,4 @@ SPEC CHECKSUMS:
|
|||
|
||||
PODFILE CHECKSUM: 6f750f6723897b213ed701c061a4f70baaeb4d54
|
||||
|
||||
COCOAPODS: 1.2.1
|
||||
COCOAPODS: 1.3.1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
import Foundation
|
||||
|
||||
/// Extension for network Error classification
|
||||
public extension Error {
|
||||
|
||||
/// Returns: TRUE if error is connection error
|
||||
var isConnectionError: Bool {
|
||||
guard let urlError = self as? URLError else {
|
||||
return false
|
||||
}
|
||||
|
||||
return urlError.code == .notConnectedToInternet || urlError.code == .timedOut
|
||||
}
|
||||
|
||||
/// Returns: TRUE if server json response is not valid
|
||||
var isResponseSerializationError: Bool {
|
||||
return (self as? AFError)?.isResponseSerializationError ?? false
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue