Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4fcd2026c | |||
| fa6684830e | |||
| 5937727493 | |||
| 6d51575c38 |
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
### 0.2.7
|
||||
|
||||
- **Fix**: Build with new LeadKit 0.7.9
|
||||
|
||||
### 0.2.6
|
||||
|
||||
- **Update**: `DefaultNetworkService` supported `NetworkServiceConfiguration`
|
||||
|
||||
### 0.2.5
|
||||
|
||||
- **Add**: Methods to notify when biometrics auth begins and ends.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "LeadKitAdditions"
|
||||
s.version = "0.2.5"
|
||||
s.version = "0.2.7"
|
||||
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"
|
||||
|
||||
+7
-13
@@ -1,25 +1,20 @@
|
||||
PODS:
|
||||
- Alamofire (4.7.1)
|
||||
- CocoaLumberjack/Default (3.4.1)
|
||||
- CocoaLumberjack/Swift (3.4.1):
|
||||
- CocoaLumberjack/Default
|
||||
- IDZSwiftCommonCrypto (0.10.0)
|
||||
- InputMask (3.0.0)
|
||||
- KeychainAccess (3.1.0)
|
||||
- LeadKit (0.7.5):
|
||||
- LeadKit/Core (= 0.7.5)
|
||||
- LeadKit/Core (0.7.5):
|
||||
- CocoaLumberjack/Swift (~> 3.4)
|
||||
- ObjectMapper (~> 3.0)
|
||||
- LeadKit (0.7.9):
|
||||
- LeadKit/Core (= 0.7.9)
|
||||
- LeadKit/Core (0.7.9):
|
||||
- ObjectMapper (~> 3.1)
|
||||
- RxAlamofire (~> 4.1)
|
||||
- RxCocoa (~> 4.1)
|
||||
- RxSwift (~> 4.1)
|
||||
- SwiftDate (~> 4.5)
|
||||
- TableKit (~> 2.6)
|
||||
- UIScrollView-InfiniteScroll (~> 1.0.0)
|
||||
- LeadKit/Core-iOS-Extension (0.7.5):
|
||||
- CocoaLumberjack/Swift (~> 3.4)
|
||||
- ObjectMapper (~> 3.0)
|
||||
- LeadKit/Core-iOS-Extension (0.7.9):
|
||||
- ObjectMapper (~> 3.1)
|
||||
- RxAlamofire (~> 4.1)
|
||||
- RxCocoa (~> 4.1)
|
||||
- RxSwift (~> 4.1)
|
||||
@@ -52,11 +47,10 @@ DEPENDENCIES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 68d7d521118d49c615a8d2214d87cdf525599d30
|
||||
CocoaLumberjack: 2e258a064cacc8eb9a2aca318e24d02a0a7fd56d
|
||||
IDZSwiftCommonCrypto: 4eef2c46e262dfbcbc1fd76365e066336680ad7d
|
||||
InputMask: 8b5c42acac19cd48fe664b739f30995103b75e75
|
||||
KeychainAccess: 94c5540b32eabf7bc32bfb976a268e8ea05fd6da
|
||||
LeadKit: 1295888d8ef6c9f58cbdb5cd7ba316362b111e19
|
||||
LeadKit: 1b74c4f9a4736a39b90119363e85468eca5c1b77
|
||||
ObjectMapper: 20505058f54e5c3ca69e1d6de9897d152a5369a6
|
||||
PinLayout: a2bbe9057d49a1e326b13dc4fe8c14751f8c8844
|
||||
RxAlamofire: 87a9c588541210cc3e4a1f843ccc3ecf3eb98b31
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
import RxSwift
|
||||
import Alamofire
|
||||
import CocoaLumberjack
|
||||
import LeadKit
|
||||
|
||||
public typealias VoidBlock = () -> Void
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
//
|
||||
|
||||
import KeychainAccess
|
||||
import CocoaLumberjack
|
||||
import IDZSwiftCommonCrypto
|
||||
|
||||
private enum Keys {
|
||||
|
||||
@@ -25,7 +25,7 @@ import LeadKit
|
||||
import RxSwift
|
||||
|
||||
/// Default implementation of network service, which trust any server and use default timeout interval
|
||||
@available(*, deprecated, message: "Use ConfigurableNetworkService protocol from LeadKit.")
|
||||
@available(*, deprecated, message: "Use NetworkService from LeadKit.")
|
||||
open class DefaultNetworkService: NetworkService {
|
||||
|
||||
open class var retryLimit: UInt {
|
||||
@@ -34,23 +34,8 @@ open class DefaultNetworkService: NetworkService {
|
||||
|
||||
private let disposeBag = DisposeBag()
|
||||
|
||||
/// Override to set base server url
|
||||
open class var baseUrl: String {
|
||||
fatalError("You should override this var: baseUrl")
|
||||
}
|
||||
|
||||
/// Override to change timeout interval default value
|
||||
open class var defaultTimeoutInterval: TimeInterval {
|
||||
return 20.0
|
||||
}
|
||||
|
||||
/// The default acceptable range 200…299
|
||||
open class var acceptableStatusCodes: [Int] {
|
||||
return Alamofire.SessionManager.defaultAcceptableStatusCodes
|
||||
}
|
||||
|
||||
public init(sessionManager: SessionManager) {
|
||||
super.init(sessionManager: sessionManager, acceptableStatusCodes: DefaultNetworkService.acceptableStatusCodes)
|
||||
public override init(configuration: NetworkServiceConfiguration) {
|
||||
super.init(configuration: configuration)
|
||||
|
||||
// Fatal error: `drive*` family of methods can be only called from `MainThread`
|
||||
DispatchQueue.main.async {
|
||||
@@ -58,28 +43,4 @@ open class DefaultNetworkService: NetworkService {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Default Values
|
||||
|
||||
/// Override to change server trust policies
|
||||
open class var serverTrustPolicies: [String: ServerTrustPolicy] {
|
||||
return [
|
||||
baseUrl: .disableEvaluation
|
||||
]
|
||||
}
|
||||
|
||||
/// Override to change default urlSession configuration
|
||||
open class var configuration: URLSessionConfiguration {
|
||||
let configuration = URLSessionConfiguration.default
|
||||
configuration.timeoutIntervalForRequest = defaultTimeoutInterval
|
||||
|
||||
return configuration
|
||||
}
|
||||
|
||||
/// Override to configure alamofire session manager
|
||||
open class var sessionManager: SessionManager {
|
||||
let sessionManager = SessionManager(configuration: configuration,
|
||||
serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies))
|
||||
return sessionManager
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user