From b6be1163b3f73873a629703f1ecfa28b028abf4b Mon Sep 17 00:00:00 2001 From: krasich74 Date: Thu, 7 May 2020 19:57:30 +0300 Subject: [PATCH 01/13] Updated Podspecs to use RxSwift 5.1.0 --- LeadKit.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LeadKit.podspec b/LeadKit.podspec index e136e676..795508ee 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -93,9 +93,9 @@ Pod::Spec.new do |s| "Sources/Structures/DataLoading/PaginationDataLoading/*" ] - ss.dependency "RxSwift", '~> 4' - ss.dependency "RxCocoa", '~> 4' - ss.dependency "RxAlamofire", '~> 4' + ss.dependency "RxSwift", '~> 5.1.0' + ss.dependency "RxCocoa", '~> 5.1.0' + ss.dependency "RxAlamofire", '~> 5.2.0' ss.dependency "SwiftDate", '~> 6' ss.ios.dependency "TableKit", '~> 2.8' From 1bd8941af48f6c8da01f28e623e923ac7303b946 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Thu, 7 May 2020 20:05:35 +0300 Subject: [PATCH 02/13] podspecs --- LeadKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LeadKit.podspec b/LeadKit.podspec index 795508ee..99077575 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -99,7 +99,7 @@ Pod::Spec.new do |s| ss.dependency "SwiftDate", '~> 6' ss.ios.dependency "TableKit", '~> 2.8' - ss.ios.dependency "SnapKit", '~> 4.0.0' + ss.ios.dependency "SnapKit", '~> 5.0.0' ss.ios.dependency "UIScrollView-InfiniteScroll", '~> 1.1.0' end From 5a39fe10cd25664d738362621f0c0dfb6c908dd3 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 9 Jun 2020 16:28:50 +0300 Subject: [PATCH 03/13] Performed migration from Alamofire 4 to Alamofire 5 Removed .swift-version in favour of swift version in podspecs --- .swift-version | 1 - Cartfile | 6 +++--- Cartfile.resolved | 8 ++++---- LeadKit.podspec | 11 ++++++----- .../Classes/Search/BaseSearchViewModel.swift | 2 +- Sources/Classes/Services/NetworkService.swift | 2 +- Sources/Classes/Services/SessionManager.swift | 18 +++++++++++++----- .../TextField/DataModelFieldBinding.swift | 7 ++++--- .../Alamofire/DataRequest+Extensions.swift | 16 ++++++++-------- .../Alamofire/SessionManager+Extensions.swift | 2 +- .../Error/Error+NetworkExtensions.swift | 2 +- .../Observable+DeferredJust.swift | 2 +- .../ObservableType+Extensions.swift | 2 +- .../Sequence/Sequence+ConcurrentMap.swift | 1 + Sources/Info-iOS.plist | 2 +- .../NetworkServiceConfiguration.swift | 12 ++++++------ 16 files changed, 52 insertions(+), 42 deletions(-) delete mode 100644 .swift-version diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 819e07a2..00000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.0 diff --git a/Cartfile b/Cartfile index 47fe345f..e967bad3 100644 --- a/Cartfile +++ b/Cartfile @@ -1,7 +1,7 @@ github "malcommac/SwiftDate" github "Alamofire/Alamofire" -github "RxSwiftCommunity/RxAlamofire" ~> 4.5 +github "RxSwiftCommunity/RxAlamofire" ~> 5.1.0 github "TouchInstinct/TableKit" -github "ReactiveX/RxSwift" ~> 4.5 +github "ReactiveX/RxSwift" ~> 5.1.0 github "pronebird/UIScrollView-InfiniteScroll" -github "SnapKit/SnapKit" ~> 4.2 \ No newline at end of file +github "SnapKit/SnapKit" ~> 5.0 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 5e06585c..4a05c98d 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,7 +1,7 @@ -github "Alamofire/Alamofire" "4.9.1" -github "ReactiveX/RxSwift" "4.5.0" -github "RxSwiftCommunity/RxAlamofire" "4.5.0" -github "SnapKit/SnapKit" "4.2.0" +github "Alamofire/Alamofire" "5.2.1" +github "ReactiveX/RxSwift" "5.1.1" +github "RxSwiftCommunity/RxAlamofire" "v5.3.1" +github "SnapKit/SnapKit" "5.0.1" github "TouchInstinct/TableKit" "2.10008.1" github "malcommac/SwiftDate" "6.1.0" github "pronebird/UIScrollView-InfiniteScroll" "1.1.0" diff --git a/LeadKit.podspec b/LeadKit.podspec index 99077575..8fe76163 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,12 +1,13 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.31" + s.version = "0.9.32" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" s.author = "Touch Instinct" s.source = { :git => "https://github.com/TouchInstinct/LeadKit.git", :tag => s.version } - s.platform = :ios, '9.0' + s.platform = :ios, '10.0' + s.swift_versions = ['5.0'] s.subspec 'UIColorHex' do |ss| ss.ios.deployment_target = '8.0' @@ -17,9 +18,9 @@ Pod::Spec.new do |s| end s.subspec 'Core' do |ss| - ss.ios.deployment_target = '9.0' - ss.tvos.deployment_target = '9.0' - ss.watchos.deployment_target = '2.0' + ss.ios.deployment_target = '10.0' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '3.0' ss.source_files = "Sources/**/*.swift" ss.watchos.exclude_files = [ diff --git a/Sources/Classes/Search/BaseSearchViewModel.swift b/Sources/Classes/Search/BaseSearchViewModel.swift index 6c2671e0..709dda0f 100644 --- a/Sources/Classes/Search/BaseSearchViewModel.swift +++ b/Sources/Classes/Search/BaseSearchViewModel.swift @@ -45,7 +45,7 @@ open class BaseSearchViewModel: GeneralDataLoadingViewModel } open var searchDebounceInterval: RxTimeInterval { - return 1 + return .seconds(1) } open var searchResultsDriver: Driver<[ItemViewModel]> { diff --git a/Sources/Classes/Services/NetworkService.swift b/Sources/Classes/Services/NetworkService.swift index 10cb8f8e..cd36c7b5 100644 --- a/Sources/Classes/Services/NetworkService.swift +++ b/Sources/Classes/Services/NetworkService.swift @@ -144,7 +144,7 @@ public extension Observable { /// /// - Parameter networkService: NetworkService to operate on it /// - Returns: The source sequence with the side-effecting behavior applied. - func counterTracking(for networkService: NetworkService) -> Observable { + func counterTracking(for networkService: NetworkService) -> Observable { return `do`(onSubscribe: { networkService.increaseRequestCounter() }, onDispose: { diff --git a/Sources/Classes/Services/SessionManager.swift b/Sources/Classes/Services/SessionManager.swift index d4d7bee8..358000f3 100644 --- a/Sources/Classes/Services/SessionManager.swift +++ b/Sources/Classes/Services/SessionManager.swift @@ -23,7 +23,7 @@ import Alamofire /// Session Manager stored in NetworkService -open class SessionManager: Alamofire.SessionManager { +open class SessionManager: Alamofire.Session { /// Response with HTTP URL Response and target object public typealias ModelResponse = (response: HTTPURLResponse, model: T) @@ -38,25 +38,33 @@ open class SessionManager: Alamofire.SessionManager { public let mappingQueue: DispatchQueue public init(configuration: URLSessionConfiguration, - serverTrustPolicyManager: ServerTrustPolicyManager, + serverTrustManager: ServerTrustManager, acceptableStatusCodes: Set, mappingQueue: DispatchQueue) { self.acceptableStatusCodes = acceptableStatusCodes self.mappingQueue = mappingQueue + + let session = URLSession(configuration: configuration) - super.init(configuration: configuration, serverTrustPolicyManager: serverTrustPolicyManager) + super.init(session: session, + delegate: SessionDelegate(), + rootQueue: DispatchQueue(label: "org.alamofire.session.rootQueue"), + serverTrustManager: serverTrustManager) } public init?(session: URLSession, delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager, + serverTrustManager: ServerTrustManager, acceptableStatusCodes: Set, mappingQueue: DispatchQueue) { self.acceptableStatusCodes = acceptableStatusCodes self.mappingQueue = mappingQueue - super.init(session: session, delegate: delegate, serverTrustPolicyManager: serverTrustPolicyManager) + super.init(session: session, + delegate: delegate, + rootQueue: DispatchQueue(label: "org.alamofire.session.rootQueue"), + serverTrustManager: serverTrustManager) } } diff --git a/Sources/Classes/Views/TextField/DataModelFieldBinding.swift b/Sources/Classes/Views/TextField/DataModelFieldBinding.swift index c91a03a1..53ea5cbc 100644 --- a/Sources/Classes/Views/TextField/DataModelFieldBinding.swift +++ b/Sources/Classes/Views/TextField/DataModelFieldBinding.swift @@ -109,8 +109,9 @@ public extension BehaviorRelay { /// - getFieldClosure: Closure for getting field string reprerentation from data model. /// - mergeFieldClosure: Closure for merging new field value into data model. /// - Returns: DataModelFieldBinding instance. - func fieldBinding(getFieldClosure: @escaping DataModelFieldBinding.GetFieldClosure, - mergeFieldClosure: @escaping DataModelFieldBinding.MergeFieldClosure) -> DataModelFieldBinding { + func fieldBinding(getFieldClosure: @escaping DataModelFieldBinding.GetFieldClosure, + mergeFieldClosure: @escaping DataModelFieldBinding.MergeFieldClosure) + -> DataModelFieldBinding { return DataModelFieldBinding(modelRelay: self, getFieldClosure: getFieldClosure, @@ -123,7 +124,7 @@ public extension BehaviorRelay where Element == String? { /// Creates DataModelFieldBinding configured with behaviour relay itself. /// /// - Returns: DataModelFieldBinding instance. - func fieldBinding() -> DataModelFieldBinding { + func fieldBinding() -> DataModelFieldBinding { return DataModelFieldBinding(modelRelay: self) } } diff --git a/Sources/Extensions/Alamofire/DataRequest+Extensions.swift b/Sources/Extensions/Alamofire/DataRequest+Extensions.swift index 22fdd5c7..64ab85d3 100644 --- a/Sources/Extensions/Alamofire/DataRequest+Extensions.swift +++ b/Sources/Extensions/Alamofire/DataRequest+Extensions.swift @@ -70,25 +70,25 @@ public extension Reactive where Base: DataRequest { } private func response(onQueue queue: DispatchQueue) -> Observable<(HTTPURLResponse, Data)> { - return responseResult(queue: queue, responseSerializer: DataRequest.dataResponseSerializer()) + return responseResult(queue: queue, responseSerializer: DataResponseSerializer()) } } -public extension ObservableType where E == DataRequest { +public extension ObservableType where Element == DataRequest { /// Method that validates status codes and catch network errors /// /// - Parameter statusCodes: set of status codes to validate /// - Returns: Observable on self - func validate(statusCodes: Set) -> Observable { + func validate(statusCodes: Set) -> Observable { return map { $0.validate(statusCode: statusCodes) } .catchAsRequestError() } } -private extension ObservableType where E == ServerResponse { +private extension ObservableType where Element == ServerResponse { - func tryMapResult(_ transform: @escaping (E) throws -> R) -> Observable { + func tryMapResult(_ transform: @escaping (Element) throws -> R) -> Observable { return map { do { return try transform($0) @@ -98,7 +98,7 @@ private extension ObservableType where E == ServerResponse { } } - func tryMapObservableResult(_ transform: @escaping (E) throws -> Observable) -> Observable { + func tryMapObservableResult(_ transform: @escaping (Element) throws -> Observable) -> Observable { return flatMap { response, result -> Observable in do { return try transform((response, result)) @@ -114,10 +114,10 @@ private extension ObservableType where E == ServerResponse { private extension ObservableType { - func catchAsRequestError(with request: DataRequest? = nil) -> Observable { + func catchAsRequestError(with request: DataRequest? = nil) -> Observable { return catchError { error in let resultError: RequestError - let response = request?.delegate.data + let response = request?.data switch error { case let requestError as RequestError: diff --git a/Sources/Extensions/Alamofire/SessionManager+Extensions.swift b/Sources/Extensions/Alamofire/SessionManager+Extensions.swift index cc4816d8..fcaa7f86 100644 --- a/Sources/Extensions/Alamofire/SessionManager+Extensions.swift +++ b/Sources/Extensions/Alamofire/SessionManager+Extensions.swift @@ -50,7 +50,7 @@ public extension Reactive where Base: SessionManager { _ url: URLConvertible, parameters: [Any]? = nil, encoding: JSONEncoding = .default, - headers: [String: String]? = nil) + headers: HTTPHeaders? = nil) -> Observable { return Observable.deferred { diff --git a/Sources/Extensions/Error/Error+NetworkExtensions.swift b/Sources/Extensions/Error/Error+NetworkExtensions.swift index 872a0508..36cd9b31 100644 --- a/Sources/Extensions/Error/Error+NetworkExtensions.swift +++ b/Sources/Extensions/Error/Error+NetworkExtensions.swift @@ -51,7 +51,7 @@ public extension ObservableType { /// - handler: closure that recieves serialized response /// - Returns: Observable on caller func handleMappingError(with decoder: JSONDecoder = JSONDecoder(), - handler: @escaping ParameterClosure) -> Observable { + handler: @escaping ParameterClosure) -> Observable { return self.do(onError: { error in guard let errorModel = try error.handleMappingError(with: decoder) as T? else { return diff --git a/Sources/Extensions/Rx/ObservableType/Observable+DeferredJust.swift b/Sources/Extensions/Rx/ObservableType/Observable+DeferredJust.swift index aabcc604..9abaa737 100644 --- a/Sources/Extensions/Rx/ObservableType/Observable+DeferredJust.swift +++ b/Sources/Extensions/Rx/ObservableType/Observable+DeferredJust.swift @@ -29,7 +29,7 @@ public extension ObservableType { /// - Parameter elementFactory: Element factory function to invoke for each observer /// that subscribes to the resulting sequence. /// - Returns: An observable sequence whose observers trigger an invocation of the given element factory function. - static func deferredJust(_ elementFactory: @escaping () throws -> E) -> Observable { + static func deferredJust(_ elementFactory: @escaping () throws -> Element) -> Observable { return .create { observer in do { observer.onNext(try elementFactory()) diff --git a/Sources/Extensions/Rx/ObservableType/ObservableType+Extensions.swift b/Sources/Extensions/Rx/ObservableType/ObservableType+Extensions.swift index 26e21936..4745cd1b 100644 --- a/Sources/Extensions/Rx/ObservableType/ObservableType+Extensions.swift +++ b/Sources/Extensions/Rx/ObservableType/ObservableType+Extensions.swift @@ -42,7 +42,7 @@ public extension ObservableType { /// Cast all emitted elements to optional type. /// /// - Returns: An observable sequence whose elements are equals to optional type of element. - func asOptional() -> Observable { + func asOptional() -> Observable { return map { $0 } } } diff --git a/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift b/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift index a6fcfff7..71843141 100644 --- a/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift +++ b/Sources/Extensions/Sequence/Sequence+ConcurrentMap.swift @@ -63,5 +63,6 @@ public extension Sequence { array.sorted { $0.idx < $1.idx } .flatMap { $0.results } } + .asObservable() } } diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index 24cd7b7e..ec0cc7b0 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.28 + $(MARKETING_VERSION) CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift b/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift index 50c68e75..68699f83 100644 --- a/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift +++ b/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift @@ -37,7 +37,7 @@ public struct NetworkServiceConfiguration { public let additionalHttpHeaders: HTTPHeaders /// Server trust policies. - public var serverTrustPolicies: [String: ServerTrustPolicy] + public var serverTrustPolicies: [String: ServerTrustEvaluating] /// HTTP response status codes regarded as non-erroneous public var acceptableStatusCodes: Set = Set(200..<300) @@ -48,20 +48,20 @@ public struct NetworkServiceConfiguration { public init(baseUrl: String, timeoutInterval: TimeInterval = 20, encoding: ParameterEncoding = URLEncoding.default, - additionalHttpHeaders: HTTPHeaders = [:], - trustPolicies: [String: ServerTrustPolicy] = [:]) { + additionalHttpHeaders: [String: String] = [:], + trustPolicies: [String: ServerTrustEvaluating] = [:]) { self.baseUrl = baseUrl self.timeoutInterval = timeoutInterval self.encoding = encoding - self.additionalHttpHeaders = additionalHttpHeaders.merging(SessionManager.defaultHTTPHeaders) { current, _ in current } + self.additionalHttpHeaders = HTTPHeaders(additionalHttpHeaders) sessionConfiguration = URLSessionConfiguration.default sessionConfiguration.timeoutIntervalForResource = timeoutInterval sessionConfiguration.httpAdditionalHeaders = additionalHttpHeaders let updatedPolicies = Dictionary(uniqueKeysWithValues: trustPolicies.map { ($0.key.asHost, $0.value) }) - serverTrustPolicies = trustPolicies.isEmpty ? [baseUrl.asHost: .disableEvaluation] : updatedPolicies + serverTrustPolicies = trustPolicies.isEmpty ? [baseUrl.asHost: DisabledTrustEvaluator()] : updatedPolicies } } @@ -70,7 +70,7 @@ public extension NetworkServiceConfiguration { /// SessionManager constructed with given parameters (session configuration and trust policies) var sessionManager: SessionManager { return SessionManager(configuration: sessionConfiguration, - serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies), + serverTrustManager: ServerTrustManager(evaluators: serverTrustPolicies), acceptableStatusCodes: acceptableStatusCodes, mappingQueue: .global()) } From 1850366709c7e09233a17e9eb74902aac5c26549 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Mon, 29 Jun 2020 12:57:53 +0300 Subject: [PATCH 04/13] Fixed Alamofire precondition --- Sources/Classes/Services/SessionManager.swift | 20 +++++++++++++++---- .../NetworkServiceConfiguration.swift | 3 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Sources/Classes/Services/SessionManager.swift b/Sources/Classes/Services/SessionManager.swift index 358000f3..ea28770f 100644 --- a/Sources/Classes/Services/SessionManager.swift +++ b/Sources/Classes/Services/SessionManager.swift @@ -45,11 +45,19 @@ open class SessionManager: Alamofire.Session { self.acceptableStatusCodes = acceptableStatusCodes self.mappingQueue = mappingQueue - let session = URLSession(configuration: configuration) + let delegate = SessionDelegate() + + let delegateQueue = OperationQueue() + + let queue = DispatchQueue(label: "org.alamofire.session.rootQueue") + + delegateQueue.underlyingQueue = queue + + let session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: delegateQueue) super.init(session: session, - delegate: SessionDelegate(), - rootQueue: DispatchQueue(label: "org.alamofire.session.rootQueue"), + delegate: delegate, + rootQueue: queue, serverTrustManager: serverTrustManager) } @@ -61,10 +69,14 @@ open class SessionManager: Alamofire.Session { self.acceptableStatusCodes = acceptableStatusCodes self.mappingQueue = mappingQueue + + let queue = DispatchQueue(label: "org.alamofire.session.rootQueue") + + session.delegateQueue.underlyingQueue = queue super.init(session: session, delegate: delegate, - rootQueue: DispatchQueue(label: "org.alamofire.session.rootQueue"), + rootQueue: queue, serverTrustManager: serverTrustManager) } } diff --git a/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift b/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift index 68699f83..fc817739 100644 --- a/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift +++ b/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift @@ -61,7 +61,8 @@ public struct NetworkServiceConfiguration { sessionConfiguration.httpAdditionalHeaders = additionalHttpHeaders let updatedPolicies = Dictionary(uniqueKeysWithValues: trustPolicies.map { ($0.key.asHost, $0.value) }) - serverTrustPolicies = trustPolicies.isEmpty ? [baseUrl.asHost: DisabledTrustEvaluator()] : updatedPolicies + print(baseUrl.asHost) + serverTrustPolicies = trustPolicies.isEmpty ? ["touchin.ru": DisabledTrustEvaluator()] : updatedPolicies } } From bba6c965c7107d6e0b04dc117a1b67328bcd266c Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 1 Sep 2020 14:15:10 +0300 Subject: [PATCH 05/13] Updated server trust policies configuration --- Sources/Classes/Services/SessionManager.swift | 4 +--- .../NetworkService/NetworkServiceConfiguration.swift | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Sources/Classes/Services/SessionManager.swift b/Sources/Classes/Services/SessionManager.swift index ea28770f..95f1242f 100644 --- a/Sources/Classes/Services/SessionManager.swift +++ b/Sources/Classes/Services/SessionManager.swift @@ -48,9 +48,8 @@ open class SessionManager: Alamofire.Session { let delegate = SessionDelegate() let delegateQueue = OperationQueue() - + let queue = DispatchQueue(label: "org.alamofire.session.rootQueue") - delegateQueue.underlyingQueue = queue let session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: delegateQueue) @@ -71,7 +70,6 @@ open class SessionManager: Alamofire.Session { self.mappingQueue = mappingQueue let queue = DispatchQueue(label: "org.alamofire.session.rootQueue") - session.delegateQueue.underlyingQueue = queue super.init(session: session, diff --git a/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift b/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift index fc817739..1bcac763 100644 --- a/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift +++ b/Sources/Structures/NetworkService/NetworkServiceConfiguration.swift @@ -60,9 +60,7 @@ public struct NetworkServiceConfiguration { sessionConfiguration.timeoutIntervalForResource = timeoutInterval sessionConfiguration.httpAdditionalHeaders = additionalHttpHeaders - let updatedPolicies = Dictionary(uniqueKeysWithValues: trustPolicies.map { ($0.key.asHost, $0.value) }) - print(baseUrl.asHost) - serverTrustPolicies = trustPolicies.isEmpty ? ["touchin.ru": DisabledTrustEvaluator()] : updatedPolicies + serverTrustPolicies = Dictionary(uniqueKeysWithValues: trustPolicies.map { ($0.key.asHost, $0.value) }) } } @@ -71,7 +69,8 @@ public extension NetworkServiceConfiguration { /// SessionManager constructed with given parameters (session configuration and trust policies) var sessionManager: SessionManager { return SessionManager(configuration: sessionConfiguration, - serverTrustManager: ServerTrustManager(evaluators: serverTrustPolicies), + serverTrustManager: ServerTrustManager(allHostsMustBeEvaluated: !serverTrustPolicies.isEmpty, + evaluators: serverTrustPolicies), acceptableStatusCodes: acceptableStatusCodes, mappingQueue: .global()) } From 52b7485755bd5fbf72c2cf31245ef0107a1a7651 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 1 Sep 2020 14:24:36 +0300 Subject: [PATCH 06/13] Updated podspecs --- LeadKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LeadKit.podspec b/LeadKit.podspec index 94ab383f..30721843 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.43" + s.version = "0.10.0" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" From 94bd1e9c36ad5ef014920c448fe5aea064f982b9 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 1 Sep 2020 14:38:44 +0300 Subject: [PATCH 07/13] Updated changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc9be9f..039c70bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 0.10.0 +- **Update**: Third party dependencies: `RxSwift` (and all sub-dependencies) to 5.1.0, `Alamofire` 5.0, `SnapKit` 5.0 +- **Refactored**: NetworkManager to use new Alamofire API +- **API BreakingChanges**: NetworkServiceConfiguration no longer accepts `ServerTrustPolicy`, it is now replaced by an instance of a `ServerTrustEvaluating` protocol. Full description and default implementations can be found at Alamofire [sources](https://github.com/Alamofire/Alamofire/blob/master/Source/ServerTrustEvaluation.swift). Since new evaluation is used, evaluation against self-signed certificates will now throw an AfError and abort any outcoming request. To support self-signed certificates use `DisabledTrustEvaluator` for specified host in configuration. + ### 0.9.43 - **Fix**: `OTPSwiftView`'s dependencies. From 75796c0adefccff8f34053a21b4ebbc4d6c86b17 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 1 Sep 2020 16:12:35 +0300 Subject: [PATCH 08/13] Fixed pr comments pt.1 --- Sources/Classes/Services/SessionManager.swift | 13 +++++-------- .../Drawing/UIImage/UIImage+Extensions.swift | 2 -- .../Support/UIScrollView+Support.swift | 17 ++--------------- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/Sources/Classes/Services/SessionManager.swift b/Sources/Classes/Services/SessionManager.swift index 95f1242f..8bb23edd 100644 --- a/Sources/Classes/Services/SessionManager.swift +++ b/Sources/Classes/Services/SessionManager.swift @@ -48,15 +48,13 @@ open class SessionManager: Alamofire.Session { let delegate = SessionDelegate() let delegateQueue = OperationQueue() - - let queue = DispatchQueue(label: "org.alamofire.session.rootQueue") - delegateQueue.underlyingQueue = queue + delegateQueue.underlyingQueue = mappingQueue let session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: delegateQueue) super.init(session: session, delegate: delegate, - rootQueue: queue, + rootQueue: mappingQueue, serverTrustManager: serverTrustManager) } @@ -68,13 +66,12 @@ open class SessionManager: Alamofire.Session { self.acceptableStatusCodes = acceptableStatusCodes self.mappingQueue = mappingQueue - - let queue = DispatchQueue(label: "org.alamofire.session.rootQueue") - session.delegateQueue.underlyingQueue = queue + + session.delegateQueue.underlyingQueue = mappingQueue super.init(session: session, delegate: delegate, - rootQueue: queue, + rootQueue: mappingQueue, serverTrustManager: serverTrustManager) } } diff --git a/Sources/Extensions/Drawing/UIImage/UIImage+Extensions.swift b/Sources/Extensions/Drawing/UIImage/UIImage+Extensions.swift index 20f7a487..8992b89b 100644 --- a/Sources/Extensions/Drawing/UIImage/UIImage+Extensions.swift +++ b/Sources/Extensions/Drawing/UIImage/UIImage+Extensions.swift @@ -22,7 +22,6 @@ import UIKit -@available(iOS 10.0, tvOS 10.0, *) public extension UIImage { /// Creates an image filled by given color. @@ -235,7 +234,6 @@ public extension UIImage { } } -@available(iOS 10.0, tvOS 10.0, *) internal extension DrawingOperation { func imageFromNewRenderer(scale: CGFloat) -> UIImage { diff --git a/Sources/Extensions/Support/UIScrollView+Support.swift b/Sources/Extensions/Support/UIScrollView+Support.swift index c72a387d..1e027069 100644 --- a/Sources/Extensions/Support/UIScrollView+Support.swift +++ b/Sources/Extensions/Support/UIScrollView+Support.swift @@ -25,23 +25,10 @@ import UIKit public extension Support where Base: UIScrollView { var refreshControl: UIRefreshControl? { - if #available(iOS 10.0, *) { - return base.refreshControl - } else { - return base.subviews.first { $0 is UIRefreshControl } as? UIRefreshControl - } + return base.refreshControl } func setRefreshControl(_ newRefreshControl: UIRefreshControl?) { - if #available(iOS 10.0, *) { - base.refreshControl = newRefreshControl - } else { - if let newControl = newRefreshControl { - refreshControl?.removeFromSuperview() - base.addSubview(newControl) - } else { - refreshControl?.removeFromSuperview() - } - } + base.refreshControl = newRefreshControl } } From 419685ae2d8430aa4ef7915c509ddcba26e92594 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 1 Sep 2020 16:53:09 +0300 Subject: [PATCH 09/13] Fixed pr comments pt.2 --- CHANGELOG.md | 1 + Sources/Classes/Services/SessionManager.swift | 10 +- .../UIImage/UIImage+SupportExtensions.swift | 283 ------------------ .../Support/UIScrollView+Support.swift | 34 --- 4 files changed, 6 insertions(+), 322 deletions(-) delete mode 100644 Sources/Extensions/Drawing/UIImage/UIImage+SupportExtensions.swift delete mode 100644 Sources/Extensions/Support/UIScrollView+Support.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d96147d..3636669e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - **Update**: Third party dependencies: `RxSwift` (and all sub-dependencies) to 5.1.0, `Alamofire` 5.0, `SnapKit` 5.0 - **Refactored**: NetworkManager to use new Alamofire API - **API BreakingChanges**: NetworkServiceConfiguration no longer accepts `ServerTrustPolicy`, it is now replaced by an instance of a `ServerTrustEvaluating` protocol. Full description and default implementations can be found at Alamofire [sources](https://github.com/Alamofire/Alamofire/blob/master/Source/ServerTrustEvaluation.swift). Since new evaluation is used, evaluation against self-signed certificates will now throw an AfError and abort any outcoming request. To support self-signed certificates use `DisabledTrustEvaluator` for specified host in configuration. +- **Removed**: UIImage+SupportExtensions, UIScrollView+Support ### 0.9.44 - **Add**: `TIFoundationUtils` - set of helpers for Foundation framework classes. diff --git a/Sources/Classes/Services/SessionManager.swift b/Sources/Classes/Services/SessionManager.swift index 8bb23edd..937fb2ad 100644 --- a/Sources/Classes/Services/SessionManager.swift +++ b/Sources/Classes/Services/SessionManager.swift @@ -58,11 +58,11 @@ open class SessionManager: Alamofire.Session { serverTrustManager: serverTrustManager) } - public init?(session: URLSession, - delegate: SessionDelegate, - serverTrustManager: ServerTrustManager, - acceptableStatusCodes: Set, - mappingQueue: DispatchQueue) { + public init(session: URLSession, + delegate: SessionDelegate, + serverTrustManager: ServerTrustManager, + acceptableStatusCodes: Set, + mappingQueue: DispatchQueue) { self.acceptableStatusCodes = acceptableStatusCodes self.mappingQueue = mappingQueue diff --git a/Sources/Extensions/Drawing/UIImage/UIImage+SupportExtensions.swift b/Sources/Extensions/Drawing/UIImage/UIImage+SupportExtensions.swift deleted file mode 100644 index 73091608..00000000 --- a/Sources/Extensions/Drawing/UIImage/UIImage+SupportExtensions.swift +++ /dev/null @@ -1,283 +0,0 @@ -// -// Copyright (c) 2017 Touch Instinct -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the Software), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import UIKit - -public extension Support where Base: UIImage { - - /// Creates an image filled by given color. - /// - /// - Parameters: - /// - color: The color to fill - /// - size: The size of an new image. - /// - Returns: A new instanse of UIImage with given size and color or nil if something goes wrong. - static func imageWith(color: UIColor, size: CGSize) -> Support? { - let width = Int(ceil(size.width)) - let height = Int(ceil(size.height)) - - let operation = SolidFillDrawingOperation(color: color.cgColor, width: width, height: height) - - return operation.imageFromNewContext(scale: UIScreen.main.scale)?.support - } - - /// Creates an image from a UIView. - /// - /// - Parameter fromView: The source view. - /// - Returns: A new instance of UIImage or nil if something goes wrong. - static func imageFrom(view: UIView) -> Support? { - let operation = CALayerDrawingOperation(layer: view.layer, size: view.bounds.size) - - guard let rotatedImage = operation.imageFromNewContext(scale: UIScreen.main.scale) else { - return nil - } - - let flipOperation = rotatedImage.cgImage?.flipYOperation(size: rotatedImage.size) - - return flipOperation?.imageFromNewContext(scale: rotatedImage.scale)?.support - } - - /// Render current template UIImage into new image using given color. - /// - /// - Parameter color: Color to fill template image. - /// - Returns: A new UIImage rendered with given color or nil if something goes wrong. - func renderTemplate(withColor color: UIColor) -> Support? { - return withCGImage { image in - let operation = TemplateDrawingOperation(image: image, - imageSize: base.size, - color: color.cgColor) - - guard let templateImage = operation.imageFromNewContext(scale: base.scale) else { - return nil - } - - let flipOperation = templateImage.cgImage?.flipYOperation(size: templateImage.size) - - return flipOperation?.imageFromNewContext(scale: templateImage.scale) - } - } - - /// Creates a new image with rounded corners and border. - /// - /// - Parameters: - /// - cornerRadius: The corner radius. - /// - borderWidth: The size of the border. - /// - color: The color of the border. - /// - extendSize: Extend result image size and don't overlap source image by border. - /// - Returns: A new image with rounded corners or nil if something goes wrong. - func roundCorners(cornerRadius: CGFloat, - borderWidth: CGFloat, - color: UIColor, - extendSize: Bool = false) -> Support? { - - return withCGImage { image in - let roundOperation = RoundDrawingOperation(image: image, - imageSize: base.size, - radius: cornerRadius) - - guard let roundImage = roundOperation.cgImageFromNewContext(scale: base.scale) else { - return nil - } - - let borderOperation = BorderDrawingOperation(image: roundImage, - imageSize: base.size, - border: borderWidth, - color: color.cgColor, - radius: cornerRadius, - extendSize: extendSize) - - return borderOperation.imageFromNewContext(scale: base.scale) - } - } - - /// Creates a new circle image. - /// - /// - Returns: A new circled image or nil if something goes wrong. - func roundCornersToCircle() -> Support? { - return withCGImage { image in - let radius = CGFloat(min(base.size.width, base.size.height) / 2) - - let operation = RoundDrawingOperation(image: image, - imageSize: base.size, - radius: radius) - - return operation.imageFromNewContext(scale: base.scale) - } - } - - /// Creates a new circle image with a border. - /// - /// - Parameters: - /// - borderWidth: The size of the border. - /// - borderColor: The color of the border. - /// - extendSize: Extend result image size and don't overlap source image by border (default = false). - /// - Returns: A new image with rounded corners or nil if something goes wrong. - func roundCornersToCircle(borderWidth: CGFloat, - borderColor: UIColor, - extendSize: Bool = false) -> Support? { - - return withCGImage { image in - let radius = CGFloat(min(base.size.width, base.size.height) / 2) - - let roundOperation = RoundDrawingOperation(image: image, - imageSize: base.size, - radius: radius) - - guard let roundImage = roundOperation.cgImageFromNewContext(scale: base.scale) else { - return nil - } - - let borderOperation = BorderDrawingOperation(image: roundImage, - imageSize: base.size, - border: borderWidth, - color: borderColor.cgColor, - radius: radius, - extendSize: extendSize) - - return borderOperation.imageFromNewContext(scale: base.scale) - } - } - - /// Creates a resized copy of an image. - /// - /// - Parameters: - /// - newSize: The new size of the image. - /// - contentMode: The way to handle the content in the new size. - /// - cropToImageBounds: Should output image size match resized image size. - /// Note: If passed true with ResizeMode.scaleAspectFit content mode it will give the original image. - /// - Returns: A new image scaled to new size. - func resize(newSize: CGSize, - contentMode: ResizeMode = .scaleToFill, - cropToImageBounds: Bool = false) -> Support? { - - return withCGImage { image in - let operation = ResizeDrawingOperation(image: image, - imageSize: base.size, - preferredNewSize: newSize, - resizeMode: contentMode, - cropToImageBounds: cropToImageBounds) - - return operation.imageFromNewContext(scale: base.scale) - } - } - - /// Adds an alpha channel if UIImage doesn't already have one. - /// - /// - Returns: A copy of the given image, adding an alpha channel if it doesn't already have one. - func applyAlpha() -> Support? { - return withCGImage { image in - let operation = ImageDrawingOperation(image: image, - newSize: base.size, - opaque: false) - - return operation.imageFromNewContext(scale: base.scale) - } - } - - /// Creates a copy of the image with border of the given size added around its edges. - /// - /// - Parameter padding: The padding amount. - /// - Returns: A new padded image or nil if something goes wrong. - func applyPadding(_ padding: CGFloat) -> Support? { - return withCGImage { image in - let operation = PaddingDrawingOperation(image: image, - imageSize: base.size, - padding: padding) - - return operation.imageFromNewContext(scale: base.scale) - } - } - - /// Creates a copy of the image rotated by the given amount of degrees. - /// - /// - Parameters: - /// - degrees: The number of degrees. - /// - clockwise: Should rotate image clockwise. - /// - Returns: A new rotated image or nil if something goes wrong. - func rotate(degrees: CGFloat, clockwise: Bool = true) -> Support? { - return withCGImage { image in - let radians = degrees.degreesToRadians() - - let operation = RotateDrawingOperation(image: image, - imageSize: base.size, - radians: radians, - clockwise: clockwise) - - guard let rotatedImage = operation.imageFromNewContext(scale: base.scale) else { - return nil - } - - let flipOperation = rotatedImage.cgImage?.flipYOperation(size: rotatedImage.size) - - return flipOperation?.imageFromNewContext(scale: rotatedImage.scale) - } - } - - private func withCGImage(_ actionClosure: (CGImage) -> UIImage?) -> Support? { - guard let image = base.cgImage else { - return Support(base) - } - - return actionClosure(image)?.support - } -} - -private extension CGImage { - - func flipYOperation(size: CGSize) -> ImageDrawingOperation { - return ImageDrawingOperation(image: self, - newSize: size, - origin: .zero, - opaque: false, - flipY: true) - } -} - -private extension DrawingOperation { - - func cgImageFromNewContext(scale: CGFloat) -> CGImage? { - let ctxSize = contextSize - - let intScale = Int(scale) - - let context = CGContext.create(width: ctxSize.width * intScale, - height: ctxSize.height * intScale, - bitmapInfo: opaque ? .opaqueBitmapInfo : .alphaBitmapInfo) - - guard let ctx = context else { - return nil - } - - ctx.scaleBy(x: scale, y: scale) - - apply(in: ctx) - - return ctx.makeImage() - } - - func imageFromNewContext(scale: CGFloat) -> UIImage? { - guard let image = cgImageFromNewContext(scale: scale) else { - return nil - } - - return UIImage(cgImage: image, scale: scale, orientation: .up) - } -} diff --git a/Sources/Extensions/Support/UIScrollView+Support.swift b/Sources/Extensions/Support/UIScrollView+Support.swift deleted file mode 100644 index 1e027069..00000000 --- a/Sources/Extensions/Support/UIScrollView+Support.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2017 Touch Instinct -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the Software), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import UIKit - -public extension Support where Base: UIScrollView { - - var refreshControl: UIRefreshControl? { - return base.refreshControl - } - - func setRefreshControl(_ newRefreshControl: UIRefreshControl?) { - base.refreshControl = newRefreshControl - } -} From 445ff1a644deb68096f99faf36e79577df2bddb4 Mon Sep 17 00:00:00 2001 From: krasich74 Date: Tue, 1 Sep 2020 17:09:48 +0300 Subject: [PATCH 10/13] completly remove files --- LeadKit.podspec | 2 -- LeadKit.xcodeproj/project.pbxproj | 10 ---------- .../PaginationDataLoading/PaginationWrapper.swift | 10 +++++----- Sources/Classes/Services/SessionManager.swift | 4 ++-- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/LeadKit.podspec b/LeadKit.podspec index 30721843..a1d3b20c 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -44,7 +44,6 @@ Pod::Spec.new do |s| "Sources/Extensions/NetworkService/NetworkService+RxLoadImage.swift", "Sources/Extensions/DataLoading/GeneralDataLoading/GeneralDataLoadingController+DefaultImplementation.swift", "Sources/Extensions/DataLoading/PaginationDataLoading/*", - "Sources/Extensions/Support/UIScrollView+Support.swift", "Sources/Extensions/Support/UINavigationItem+Support.swift", "Sources/Extensions/TableKit/**/*.swift", "Sources/Extensions/Array/Array+SeparatorRowBoxExtensions.swift", @@ -81,7 +80,6 @@ Pod::Spec.new do |s| "Sources/Structures/Drawing/CALayerDrawingOperation.swift", "Sources/Enums/Search/*", "Sources/Extensions/DataLoading/PaginationDataLoading/*", - "Sources/Extensions/Support/UIScrollView+Support.swift", "Sources/Extensions/Support/UINavigationItem+Support.swift", "Sources/Extensions/TableKit/**/*.swift", "Sources/Extensions/Array/Array+SeparatorRowBoxExtensions.swift", diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index 66fb2a14..e040f794 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -95,7 +95,6 @@ 671462C81EB3396E00EAB194 /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FC1EB3396E00EAB194 /* String+Localization.swift */; }; 671462CA1EB3396E00EAB194 /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FC1EB3396E00EAB194 /* String+Localization.swift */; }; 671462CB1EB3396E00EAB194 /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FC1EB3396E00EAB194 /* String+Localization.swift */; }; - 671462D01EB3396E00EAB194 /* UIScrollView+Support.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FF1EB3396E00EAB194 /* UIScrollView+Support.swift */; }; 671462D41EB3396E00EAB194 /* TableDirector+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462011EB3396E00EAB194 /* TableDirector+Extensions.swift */; }; 671462D81EB3396E00EAB194 /* TimeInterval+DateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462031EB3396E00EAB194 /* TimeInterval+DateComponents.swift */; }; 671462DA1EB3396E00EAB194 /* TimeInterval+DateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462031EB3396E00EAB194 /* TimeInterval+DateComponents.swift */; }; @@ -105,8 +104,6 @@ 671462E71EB3396E00EAB194 /* UIColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462091EB3396E00EAB194 /* UIColor+Hex.swift */; }; 671462EC1EB3396E00EAB194 /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */; }; 671462EF1EB3396E00EAB194 /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */; }; - 671462F01EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */; }; - 671462F31EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */; }; 671462FC1EB3396E00EAB194 /* UIView+XibNameProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462131EB3396E00EAB194 /* UIView+XibNameProtocol.swift */; }; 671462FF1EB3396E00EAB194 /* UIView+XibNameProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462131EB3396E00EAB194 /* UIView+XibNameProtocol.swift */; }; 671463001EB3396E00EAB194 /* UIView+LoadFromNib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462141EB3396E00EAB194 /* UIView+LoadFromNib.swift */; }; @@ -589,12 +586,10 @@ 671461F11EB3396E00EAB194 /* Observable+DeferredJust.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+DeferredJust.swift"; sourceTree = ""; }; 671461F61EB3396E00EAB194 /* Sequence+ConcurrentMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sequence+ConcurrentMap.swift"; sourceTree = ""; }; 671461FC1EB3396E00EAB194 /* String+Localization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Localization.swift"; sourceTree = ""; }; - 671461FF1EB3396E00EAB194 /* UIScrollView+Support.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Support.swift"; sourceTree = ""; }; 671462011EB3396E00EAB194 /* TableDirector+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableDirector+Extensions.swift"; sourceTree = ""; }; 671462031EB3396E00EAB194 /* TimeInterval+DateComponents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TimeInterval+DateComponents.swift"; sourceTree = ""; }; 671462091EB3396E00EAB194 /* UIColor+Hex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Hex.swift"; sourceTree = ""; }; 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Extensions.swift"; sourceTree = ""; }; - 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+SupportExtensions.swift"; sourceTree = ""; }; 671462131EB3396E00EAB194 /* UIView+XibNameProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+XibNameProtocol.swift"; sourceTree = ""; }; 671462141EB3396E00EAB194 /* UIView+LoadFromNib.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+LoadFromNib.swift"; sourceTree = ""; }; 671462151EB3396E00EAB194 /* UIView+LoadingIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+LoadingIndicator.swift"; sourceTree = ""; }; @@ -1110,7 +1105,6 @@ isa = PBXGroup; children = ( 7295474121E6628C009558E7 /* UINavigationItem+Support.swift */, - 671461FF1EB3396E00EAB194 /* UIScrollView+Support.swift */, ); path = Support; sourceTree = ""; @@ -1145,7 +1139,6 @@ isa = PBXGroup; children = ( 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */, - 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */, ); path = UIImage; sourceTree = ""; @@ -2470,7 +2463,6 @@ 671462841EB3396E00EAB194 /* CGContext+Initializers.swift in Sources */, EFBE57DB1EC361620040E00A /* UIView+Layout.swift in Sources */, 6714634C1EB3396E00EAB194 /* ReuseIdentifierProtocol.swift in Sources */, - 671462F01EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */, 6741CEAF20E242A500FEC4D9 /* TableViewHolder+ScrollViewHolder.swift in Sources */, 67CAF8C620652E2A00527085 /* TextFieldViewModel.swift in Sources */, 671462681EB3396E00EAB194 /* NetworkService.swift in Sources */, @@ -2493,7 +2485,6 @@ 72005A1F2266226800ECE090 /* CustomizableButtonViewModel.swift in Sources */, 677B06C4211884F3006C947D /* BaseTextAttributes.swift in Sources */, 675E0AA921072FF400CDC143 /* BaseScrollContentController.swift in Sources */, - 671462D01EB3396E00EAB194 /* UIScrollView+Support.swift in Sources */, 671463901EB3396E00EAB194 /* TemplateDrawingOperation.swift in Sources */, A658E54D1F8CD7790093527A /* TableRow+SeparatorsExtensions.swift in Sources */, 85A5D49522AA975000C7D254 /* Decimal+Rounding.swift in Sources */, @@ -2814,7 +2805,6 @@ 671463631EB3396E00EAB194 /* SupportProtocol.swift in Sources */, 671462871EB3396E00EAB194 /* CGContext+Initializers.swift in Sources */, 6714634F1EB3396E00EAB194 /* ReuseIdentifierProtocol.swift in Sources */, - 671462F31EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */, 6714626B1EB3396E00EAB194 /* NetworkService.swift in Sources */, 67E352612119B7570035BDDB /* BasePlaceholerView.swift in Sources */, 673CF43A2063E7CE00C329F6 /* GeneralDataLoadingController+DefaultImplementation.swift in Sources */, diff --git a/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift b/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift index e1ecbed9..c58bee3f 100644 --- a/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift +++ b/Sources/Classes/DataLoading/PaginationDataLoading/PaginationWrapper.swift @@ -162,7 +162,7 @@ final public class PaginationWrapper Date: Thu, 3 Sep 2020 21:08:54 +0300 Subject: [PATCH 11/13] Up version of Alamofire and RxAlamofire --- Cartfile.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index 4a05c98d..0653077e 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ -github "Alamofire/Alamofire" "5.2.1" +github "Alamofire/Alamofire" "5.2.2" github "ReactiveX/RxSwift" "5.1.1" -github "RxSwiftCommunity/RxAlamofire" "v5.3.1" +github "RxSwiftCommunity/RxAlamofire" "v5.6.1" github "SnapKit/SnapKit" "5.0.1" github "TouchInstinct/TableKit" "2.10008.1" github "malcommac/SwiftDate" "6.1.0" From ec02ac7be63b127ddcd3d98ecd80f25b6ecb7b98 Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 3 Sep 2020 21:19:30 +0300 Subject: [PATCH 12/13] Up version of Alamofire and RxAlamofire --- Cartfile | 2 +- LeadKit.podspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cartfile b/Cartfile index e967bad3..d85cec25 100644 --- a/Cartfile +++ b/Cartfile @@ -1,6 +1,6 @@ github "malcommac/SwiftDate" github "Alamofire/Alamofire" -github "RxSwiftCommunity/RxAlamofire" ~> 5.1.0 +github "RxSwiftCommunity/RxAlamofire" ~> 5.6.0 github "TouchInstinct/TableKit" github "ReactiveX/RxSwift" ~> 5.1.0 github "pronebird/UIScrollView-InfiniteScroll" diff --git a/LeadKit.podspec b/LeadKit.podspec index a1d3b20c..01c7132b 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.10.0" + s.version = "0.10.1" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" @@ -94,7 +94,7 @@ Pod::Spec.new do |s| ss.dependency "RxSwift", '~> 5.1.0' ss.dependency "RxCocoa", '~> 5.1.0' - ss.dependency "RxAlamofire", '~> 5.2.0' + ss.dependency "RxAlamofire", '~> 5.6.0' ss.dependency "SwiftDate", '~> 6' ss.ios.dependency "TableKit", '~> 2.8' From f9f62b3fe72558dcdc2715127fdcc5338d7aa3d1 Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 3 Sep 2020 21:20:17 +0300 Subject: [PATCH 13/13] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3636669e..2817a2ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.10.1 +- **Update**: Third party dependencies: `Alamofire` 5.2.2, `RxAlamofire` 5.6.1 + ### 0.10.0 - **Update**: Third party dependencies: `RxSwift` (and all sub-dependencies) to 5.1.0, `Alamofire` 5.0, `SnapKit` 5.0 - **Refactored**: NetworkManager to use new Alamofire API