From 6358386303fa1902f6c6a1c23bd2f2376dcf5bd2 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Fri, 19 May 2023 16:30:37 +0300 Subject: [PATCH 1/7] feat: added HTTP status codes to `EndpointErrorResult.apiError` responses --- CHANGELOG.md | 4 +++ .../Sources/BaseCancellable.swift | 2 ++ .../Cancellables/Sources/Cancellables.swift | 14 +++++--- .../DefaultJsonNetworkService.swift | 18 +++++----- .../Sources/ApiInteractor/ApiInteractor.swift | 13 +++---- .../ApiInteractor/EndpointErrorResult.swift | 2 +- .../Response/ResponseType+Decoding.swift | 16 ++++----- .../Sources/Response/StatusCodeMimeType.swift | 35 +++++++++++++++++++ .../Response/StatusCodesMimeType.swift | 35 +++++++++++++++++++ .../Sources/Alerts/Models/AlertAction.swift | 6 ++-- .../Alerts/Models/AlertDescriptor.swift | 10 +++--- 11 files changed, 119 insertions(+), 36 deletions(-) create mode 100644 TINetworking/Sources/Response/StatusCodeMimeType.swift create mode 100644 TINetworking/Sources/Response/StatusCodesMimeType.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd750d0..39272316 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 1.44.0 + +- **Added**: HTTP status codes to `EndpointErrorResult.apiError` responses + ### 1.43.1 - **Fixed**: build scripts submodule url diff --git a/TIFoundationUtils/Cancellables/Sources/BaseCancellable.swift b/TIFoundationUtils/Cancellables/Sources/BaseCancellable.swift index 9797e918..850fa217 100644 --- a/TIFoundationUtils/Cancellables/Sources/BaseCancellable.swift +++ b/TIFoundationUtils/Cancellables/Sources/BaseCancellable.swift @@ -23,6 +23,8 @@ open class BaseCancellable: Cancellable { private(set) public var isCancelled = false + public init() {} + open func cancel() { isCancelled = true } diff --git a/TIFoundationUtils/Cancellables/Sources/Cancellables.swift b/TIFoundationUtils/Cancellables/Sources/Cancellables.swift index cf662966..99b012ee 100644 --- a/TIFoundationUtils/Cancellables/Sources/Cancellables.swift +++ b/TIFoundationUtils/Cancellables/Sources/Cancellables.swift @@ -20,7 +20,7 @@ // THE SOFTWARE. // -public struct Cancellables { +public enum Cancellables { public static func nonCancellable() -> Cancellable { NonCancellable() } @@ -28,21 +28,27 @@ public struct Cancellables { public static func scoped(scopeCancellableClosure: ScopeCancellable.ScopeCancellableClosure) -> Cancellable { ScopeCancellable(scopeCancellableClosure: scopeCancellableClosure) } + + public static func weakTargetClosure(target: T?, + cancelClosure: @escaping WeakTargetCancellable.CancelClosure) -> Cancellable { + + WeakTargetCancellable(target: target, cancelClosure: cancelClosure) + } } @available(iOS 13.0.0, *) public func withTaskCancellableClosure(closure: (@escaping (T) -> Void) -> Cancellable) async -> T { let cancellableBag = BaseCancellableBag() - return await withTaskCancellationHandler(handler: { - cancellableBag.cancel() - }, operation: { + return await withTaskCancellationHandler(operation: { await withCheckedContinuation { continuation in closure { continuation.resume(returning: $0) } .add(to: cancellableBag) } + }, onCancel: { + cancellableBag.cancel() }) } diff --git a/TIMoyaNetworking/Sources/NetworkService/DefaultJsonNetworkService.swift b/TIMoyaNetworking/Sources/NetworkService/DefaultJsonNetworkService.swift index 16860ff6..f7da59ff 100644 --- a/TIMoyaNetworking/Sources/NetworkService/DefaultJsonNetworkService.swift +++ b/TIMoyaNetworking/Sources/NetworkService/DefaultJsonNetworkService.swift @@ -68,9 +68,9 @@ open class DefaultJsonNetworkService: ApiInteractor { defaultServer: openApi.defaultServer) } - open func process(request: EndpointRequest, + open func process(request: EndpointRequest, mapSuccess: @escaping Closure, - mapFailure: @escaping Closure, + mapFailure: @escaping Closure, R>, mapNetworkError: @escaping Closure, completion: @escaping ParameterClosure) -> TIFoundationUtils.Cancellable { @@ -115,9 +115,9 @@ open class DefaultJsonNetworkService: ApiInteractor { return cancellableBag } - open func process(request: SerializedRequest, + open func process(request: SerializedRequest, mapSuccess: @escaping Closure, - mapFailure: @escaping Closure, + mapFailure: @escaping Closure, R>, mapNetworkError: @escaping Closure, completion: @escaping ParameterClosure) -> TIFoundationUtils.Cancellable { @@ -152,8 +152,10 @@ open class DefaultJsonNetworkService: ApiInteractor { } let decodeResult = rawResponse.decode(mapping: [ - ((successStatusCodes, CommonMediaTypes.applicationJson.rawValue), jsonDecoder.decoding(to: mapSuccess)), - ((failureStatusCodes, CommonMediaTypes.applicationJson.rawValue), jsonDecoder.decoding(to: mapFailure)), + KeyValueTuple(.json(with: successStatusCodes), jsonDecoder.decoding(to: mapSuccess)), + KeyValueTuple(.json(with: failureStatusCodes), jsonDecoder.decoding(to: { + mapFailure(FailureMappingInput($0, rawResponse.statusCode)) + })), ]) let pluginResult: Result @@ -192,10 +194,10 @@ open class DefaultJsonNetworkService: ApiInteractor { preprocessors.append(securityPreprocessor) } - private static func preprocess(request: EndpointRequest, + private static func preprocess(request: EndpointRequest, preprocessors: P, cancellableBag: BaseCancellableBag, - completion: @escaping (Result, Error>) -> Void) + completion: @escaping (Result, Error>) -> Void) where P.Element == EndpointRequestPreprocessor { guard let preprocessor = preprocessors.first else { diff --git a/TINetworking/Sources/ApiInteractor/ApiInteractor.swift b/TINetworking/Sources/ApiInteractor/ApiInteractor.swift index 453b3d0d..93a5e148 100644 --- a/TINetworking/Sources/ApiInteractor/ApiInteractor.swift +++ b/TINetworking/Sources/ApiInteractor/ApiInteractor.swift @@ -27,10 +27,11 @@ public protocol ApiInteractor { associatedtype NetworkError typealias RequestResult = EndpointRequestResult + typealias FailureMappingInput = (apiError: AE, statusCode: Int) func process(request: EndpointRequest, mapSuccess: @escaping Closure, - mapFailure: @escaping Closure, + mapFailure: @escaping Closure, R>, mapNetworkError: @escaping Closure, completion: @escaping ParameterClosure) -> Cancellable } @@ -40,14 +41,14 @@ public extension ApiInteractor { func process(request: EndpointRequest) async -> RequestResult { await process(request: request, mapSuccess: Result.success, - mapFailure: { .failure(.apiError($0)) }, + mapFailure: { .failure(.apiError($0.apiError, $0.statusCode)) }, mapNetworkError: { .failure(.networkError($0)) }) } - func process(request: EndpointRequest, - mapSuccess: @escaping Closure, - mapFailure: @escaping Closure, - mapNetworkError: @escaping Closure) async -> R { + func process(request: EndpointRequest, + mapSuccess: @escaping Closure, + mapFailure: @escaping Closure, R>, + mapNetworkError: @escaping Closure) async -> R { await withTaskCancellableClosure { completion in process(request: request, diff --git a/TINetworking/Sources/ApiInteractor/EndpointErrorResult.swift b/TINetworking/Sources/ApiInteractor/EndpointErrorResult.swift index 4e3f9b36..38e746de 100644 --- a/TINetworking/Sources/ApiInteractor/EndpointErrorResult.swift +++ b/TINetworking/Sources/ApiInteractor/EndpointErrorResult.swift @@ -21,6 +21,6 @@ // public enum EndpointErrorResult: Error { - case apiError(ApiError) + case apiError(ApiError, Int) case networkError(NetworkError) } diff --git a/TINetworking/Sources/Response/ResponseType+Decoding.swift b/TINetworking/Sources/Response/ResponseType+Decoding.swift index ad2a0499..da78f1ac 100644 --- a/TINetworking/Sources/Response/ResponseType+Decoding.swift +++ b/TINetworking/Sources/Response/ResponseType+Decoding.swift @@ -23,15 +23,12 @@ import Foundation import TISwiftUtils -public typealias StatusCodeMimeType = (statusCode: Int, mimeType: String?) -public typealias StatusCodesMimeType = (statusCodes: Set, mimeType: String?) - -public typealias DecodingClosure = ThrowableClosure - public extension ResponseType { + typealias DecodingClosure = ThrowableClosure + func decode(mapping: [KeyValueTuple>]) -> Result { - for ((mappingStatusCode, mappingMimeType), decodeClosure) in mapping - where mappingStatusCode == statusCode && mappingMimeType == mimeType { + for (statusCodesMimeType, decodeClosure) in mapping + where statusCodesMimeType.statusCode == statusCode && statusCodesMimeType.mimeType == mimeType { do { return .success(try decodeClosure(data)) } catch { @@ -52,7 +49,8 @@ public extension ResponseType { func decode(mapping: [KeyValueTuple>]) -> Result { decode(mapping: mapping.map { key, value in - key.statusCodes.map { KeyValueTuple(StatusCodeMimeType($0, key.mimeType), value) } - }.flatMap { $0 }) + key.statusCodes.map { KeyValueTuple(StatusCodeMimeType(statusCode: $0, mimeType: key.mimeType), value) } + } + .flatMap { $0 }) } } diff --git a/TINetworking/Sources/Response/StatusCodeMimeType.swift b/TINetworking/Sources/Response/StatusCodeMimeType.swift new file mode 100644 index 00000000..6cfdc11d --- /dev/null +++ b/TINetworking/Sources/Response/StatusCodeMimeType.swift @@ -0,0 +1,35 @@ +// +// Copyright (c) 2023 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. +// + +public struct StatusCodeMimeType { + public let statusCode: Int + public let mimeType: String? + + public init(statusCode: Int, mimeType: String?) { + self.statusCode = statusCode + self.mimeType = mimeType + } + + public static func json(with statusCode: Int) -> Self { + .init(statusCode: statusCode, mimeType: CommonMediaTypes.applicationJson.rawValue) + } +} diff --git a/TINetworking/Sources/Response/StatusCodesMimeType.swift b/TINetworking/Sources/Response/StatusCodesMimeType.swift new file mode 100644 index 00000000..eae5fe1a --- /dev/null +++ b/TINetworking/Sources/Response/StatusCodesMimeType.swift @@ -0,0 +1,35 @@ +// +// Copyright (c) 2023 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. +// + +public struct StatusCodesMimeType { + public let statusCodes: Set + public let mimeType: String? + + public init(statusCodes: Set, mimeType: String?) { + self.statusCodes = statusCodes + self.mimeType = mimeType + } + + public static func json(with statusCodes: Set) -> Self { + .init(statusCodes: statusCodes, mimeType: CommonMediaTypes.applicationJson.rawValue) + } +} diff --git a/TIUIKitCore/Sources/Alerts/Models/AlertAction.swift b/TIUIKitCore/Sources/Alerts/Models/AlertAction.swift index d919c7ee..7b33cc55 100644 --- a/TIUIKitCore/Sources/Alerts/Models/AlertAction.swift +++ b/TIUIKitCore/Sources/Alerts/Models/AlertAction.swift @@ -29,13 +29,13 @@ public struct AlertAction { public let id = UUID() /// Alert button title - public let title: String + public var title: String /// Alert button style - public let style: UIAlertAction.Style + public var style: UIAlertAction.Style /// Alert button action - public let action: VoidClosure? + public var action: VoidClosure? public init(title: String, style: UIAlertAction.Style = .default, action: VoidClosure? = nil) { self.title = title diff --git a/TIUIKitCore/Sources/Alerts/Models/AlertDescriptor.swift b/TIUIKitCore/Sources/Alerts/Models/AlertDescriptor.swift index 2c6c81b8..2926b34c 100644 --- a/TIUIKitCore/Sources/Alerts/Models/AlertDescriptor.swift +++ b/TIUIKitCore/Sources/Alerts/Models/AlertDescriptor.swift @@ -26,19 +26,19 @@ import UIKit public struct AlertDescriptor { /// Alert title - public let title: String? + public var title: String? /// Alert message - public let message: String? + public var message: String? /// Alert style - public let style: UIAlertController.Style + public var style: UIAlertController.Style /// Alert tint color - public let tintColor: UIColor + public var tintColor: UIColor /// Alert actions - public let actions: [AlertAction] + public var actions: [AlertAction] public init(title: String? = nil, message: String? = nil, -- 2.40.1 From 4ea76a8499a33af629130b4ced3b725ebc3f8e5b Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Fri, 19 May 2023 16:41:49 +0300 Subject: [PATCH 2/7] feat: add SwiftLint --- CHANGELOG.md | 1 + Package.swift | 22 ++++++++++- Plugins/TISwiftLintPlugin/plugin.swift | 51 ++++++++++++++++++++++++++ build-scripts | 2 +- swiftlint_base.yml | 1 + 5 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 Plugins/TISwiftLintPlugin/plugin.swift create mode 120000 swiftlint_base.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 39272316..ce7864ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 1.44.0 - **Added**: HTTP status codes to `EndpointErrorResult.apiError` responses +- **Added**: SwiftLint pre-build SPM step to TINetworking module ### 1.43.1 diff --git a/Package.swift b/Package.swift index ac8de7df..663448ce 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,7 @@ // swift-tools-version:5.7 + +#if canImport(PackageDescription) + import PackageDescription let package = Package( @@ -71,7 +74,12 @@ let package = Package( .target(name: "TIDeveloperUtils", dependencies: ["TISwiftUtils", "TIUIKitCore", "TIUIElements"], path: "TIDeveloperUtils/Sources"), // MARK: - Networking - .target(name: "TINetworking", dependencies: ["TIFoundationUtils", "Alamofire"], path: "TINetworking/Sources"), + + .target(name: "TINetworking", + dependencies: ["TIFoundationUtils", "Alamofire"], + path: "TINetworking/Sources", + plugins: [.plugin(name: "TISwiftLintPlugin")]), + .target(name: "TIMoyaNetworking", dependencies: ["TINetworking", "TIFoundationUtils", "Moya"], path: "TIMoyaNetworking"), .target(name: "TINetworkingCache", dependencies: ["TIFoundationUtils", "TINetworking", "Cache"], path: "TINetworkingCache/Sources"), @@ -89,7 +97,15 @@ let package = Package( dependencies: [.product(name: "Antlr4", package: "antlr4")], path: "TITextProcessing/Sources", exclude: ["TITextProcessing.app"]), - + + .binaryTarget(name: "SwiftLintBinary", + url: "https://github.com/realm/SwiftLint/releases/download/0.52.2/SwiftLintBinary-macos.artifactbundle.zip", + checksum: "89651e1c87fb62faf076ef785a5b1af7f43570b2b74c6773526e0d5114e0578e"), + + .plugin(name: "TISwiftLintPlugin", + capability: .buildTool(), + dependencies: ["SwiftLintBinary"]), + // MARK: - Tests .testTarget( @@ -102,3 +118,5 @@ let package = Package( path: "Tests/TITextProcessingTests") ] ) + +#endif diff --git a/Plugins/TISwiftLintPlugin/plugin.swift b/Plugins/TISwiftLintPlugin/plugin.swift new file mode 100644 index 00000000..65d8ad89 --- /dev/null +++ b/Plugins/TISwiftLintPlugin/plugin.swift @@ -0,0 +1,51 @@ +// +// Copyright (c) 2023 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 PackagePlugin +import Foundation + +@main +struct SwiftLintPlugin: BuildToolPlugin { + func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { + let swiftlintScriptPath = context.package.directory.appending(["build-scripts", "xcode", "build_phases", "swiftlint.sh"]) + + let swiftlintExecutablePath = try context.tool(named: "swiftlint").path + + return [ + .prebuildCommand(displayName: "SwiftLint linting...", + executable: swiftlintScriptPath, + arguments: [ + swiftlintExecutablePath, + context.package.directory.appending(subpath: "swiftlint_base.yml") + ], + environment: [ + "SCRIPT_DIR": swiftlintScriptPath.removingLastComponent().string, + "SRCROOT": context.package.directory.string, + "SCRIPT_INPUT_FILE_COUNT": "1", + "SCRIPT_INPUT_FILE_0": target.directory.removingLastComponent().lastComponent, +// "FORCE_LINT": "1", // Lint all files in target (not only modified) + "AUTOCORRECT": "1" // + ], + outputFilesDirectory: context.package.directory) + ] + } +} diff --git a/build-scripts b/build-scripts index 1f83bf5d..b843196f 160000 --- a/build-scripts +++ b/build-scripts @@ -1 +1 @@ -Subproject commit 1f83bf5d08bbc2c2346141621a42b2d2e0dd6517 +Subproject commit b843196f3c9d9eda4ec8eeba29bf5cc859f55f18 diff --git a/swiftlint_base.yml b/swiftlint_base.yml new file mode 120000 index 00000000..569e1f72 --- /dev/null +++ b/swiftlint_base.yml @@ -0,0 +1 @@ +build-scripts/xcode/.swiftlint.yml \ No newline at end of file -- 2.40.1 From fd0365a37077edbed0c92022d10e6fe75e19659e Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Fri, 19 May 2023 17:48:20 +0300 Subject: [PATCH 3/7] fix: code lint issues in TINetworking --- Plugins/TISwiftLintPlugin/plugin.swift | 1 - .../Sources/Operation+Extensions.swift | 6 ++-- .../FingerprintsTrustEvaluator.swift | 5 ++- .../EndpointRecoverableRequestResult.swift | 4 ++- TINetworking/Sources/HTTPCodes.swift | 4 +++ .../AnyEndpointRequestRetrier.swift | 4 ++- .../DefaultTokenInterceptor.swift | 10 +++--- .../EndpointResponseTokenInterceptor.swift | 4 ++- .../ApplicationJsonBodySerializer.swift | 2 +- .../EmptyResponseContent.swift | 2 +- .../Encoding/HeaderParameterEncoding.swift | 12 +++++-- .../Encoding/PathParameterEncoding.swift | 2 +- .../EndpointRequest+Serialization.swift | 6 ++-- .../Sources/Request/SerializedRequest.swift | 16 ++++----- ...tEndpointSecurityRequestPreprocessor.swift | 9 +++-- ...ltSecuritySchemesRequestPreprocessor.swift | 35 +++++++++---------- .../EndpointRequestPreprocessor.swift | 6 ++-- .../EndpointSecurityRequestPreprocessor.swift | 10 +++--- .../HTTPAuthenticationScheme.swift | 4 +-- .../Sources/SpecEntities/Server.swift | 4 ++- .../Sources/String+URLExtensions.swift | 2 +- run_swiftlint.sh | 14 -------- 22 files changed, 84 insertions(+), 78 deletions(-) delete mode 100644 run_swiftlint.sh diff --git a/Plugins/TISwiftLintPlugin/plugin.swift b/Plugins/TISwiftLintPlugin/plugin.swift index 65d8ad89..c707e90c 100644 --- a/Plugins/TISwiftLintPlugin/plugin.swift +++ b/Plugins/TISwiftLintPlugin/plugin.swift @@ -21,7 +21,6 @@ // import PackagePlugin -import Foundation @main struct SwiftLintPlugin: BuildToolPlugin { diff --git a/TIFoundationUtils/AsyncOperation/Sources/Operation+Extensions.swift b/TIFoundationUtils/AsyncOperation/Sources/Operation+Extensions.swift index e6927b29..60b235f5 100644 --- a/TIFoundationUtils/AsyncOperation/Sources/Operation+Extensions.swift +++ b/TIFoundationUtils/AsyncOperation/Sources/Operation+Extensions.swift @@ -40,8 +40,10 @@ public extension Operation { leafDependency.addDependency(startOperation) } } - - func add(to operationQueue: OperationQueue, waitUntilFinished: Bool = false) { + + @discardableResult + func add(to operationQueue: OperationQueue, waitUntilFinished: Bool = false) -> Self { operationQueue.addOperations(flattenDependencies + [self], waitUntilFinished: waitUntilFinished) + return self } } diff --git a/TINetworking/Sources/Alamofire/FingerprintsTrustEvaluation/FingerprintsTrustEvaluator.swift b/TINetworking/Sources/Alamofire/FingerprintsTrustEvaluation/FingerprintsTrustEvaluator.swift index 36b23638..135868ca 100644 --- a/TINetworking/Sources/Alamofire/FingerprintsTrustEvaluation/FingerprintsTrustEvaluator.swift +++ b/TINetworking/Sources/Alamofire/FingerprintsTrustEvaluation/FingerprintsTrustEvaluator.swift @@ -41,8 +41,8 @@ open class FingerprintsTrustEvaluator: ServerTrustEvaluating { guard SecTrustGetCertificateCount(trust) > 0, let certificate = SecTrustGetCertificateAtIndex(trust, 0) else { - throw PinValidationFailed.unableToExtractPin(trust: trust) - } + throw PinValidationFailed.unableToExtractPin(trust: trust) + } let certificateData = SecCertificateCopyData(certificate) as Data @@ -65,4 +65,3 @@ open class FingerprintsTrustEvaluator: ServerTrustEvaluating { } } } - diff --git a/TINetworking/Sources/ApiInteractor/EndpointRecoverableRequestResult.swift b/TINetworking/Sources/ApiInteractor/EndpointRecoverableRequestResult.swift index 550f1310..ae0bdfa1 100644 --- a/TINetworking/Sources/ApiInteractor/EndpointRecoverableRequestResult.swift +++ b/TINetworking/Sources/ApiInteractor/EndpointRecoverableRequestResult.swift @@ -20,4 +20,6 @@ // THE SOFTWARE. // -public typealias EndpointRecoverableRequestResult = Result>> +public typealias EndpointRecoverableRequestResult = Result>> diff --git a/TINetworking/Sources/HTTPCodes.swift b/TINetworking/Sources/HTTPCodes.swift index 1aef0d90..db2885ae 100644 --- a/TINetworking/Sources/HTTPCodes.swift +++ b/TINetworking/Sources/HTTPCodes.swift @@ -32,12 +32,16 @@ public enum HTTPCodes { switch self { case .informational: return Set(100...199) + case .success: return Set(200...299) + case .redirection: return Set(300...399) + case .clientError: return Set(400...499) + case .serverError: return Set(500...599) } diff --git a/TINetworking/Sources/Interceptors/AnyEndpointRequestRetrier.swift b/TINetworking/Sources/Interceptors/AnyEndpointRequestRetrier.swift index 567a6cac..09a70c5d 100644 --- a/TINetworking/Sources/Interceptors/AnyEndpointRequestRetrier.swift +++ b/TINetworking/Sources/Interceptors/AnyEndpointRequestRetrier.swift @@ -32,7 +32,9 @@ public struct AnyEndpointRequestRetrier: EndpointRequestRetr self.validateAndRepairClosure = retrier.validateAndRepair } - public func validateAndRepair(errorResults: [ErrorResult], completion: @escaping (EndpointRetryResult) -> Void) -> Cancellable { + public func validateAndRepair(errorResults: [ErrorResult], + completion: @escaping (EndpointRetryResult) -> Void) -> Cancellable { + validateAndRepairClosure(errorResults, completion) } } diff --git a/TINetworking/Sources/Interceptors/DefaultTokenInterceptor.swift b/TINetworking/Sources/Interceptors/DefaultTokenInterceptor.swift index 03a5367b..b5933217 100644 --- a/TINetworking/Sources/Interceptors/DefaultTokenInterceptor.swift +++ b/TINetworking/Sources/Interceptors/DefaultTokenInterceptor.swift @@ -72,7 +72,7 @@ open class DefaultTokenInterceptor: RequestInterceptor { } // MARK: - RequestRetrier - + open func retry(_ request: Request, for session: Session, dueTo error: Error, @@ -85,6 +85,7 @@ open class DefaultTokenInterceptor: RequestInterceptor { switch $0 { case let .success(retryResult): completion(retryResult) + case let .failure(refreshError): completion(.doNotRetryWithError(refreshError)) } @@ -102,7 +103,7 @@ open class DefaultTokenInterceptor: RequestInterceptor { defaultCompletionResult: T, recoveredCompletionResult: T) -> Cancellable { - let operation = ClosureAsyncOperation(cancellableTaskClosure: { [refreshTokenClosure] operationCompletion in + ClosureAsyncOperation(cancellableTaskClosure: { [refreshTokenClosure] operationCompletion in if validationClosure() { return refreshTokenClosure { if let error = $0 { @@ -119,9 +120,6 @@ open class DefaultTokenInterceptor: RequestInterceptor { }) .observe(onResult: completion, callbackQueue: .global()) - - operation.add(to: processingQueue) - - return operation + .add(to: processingQueue) } } diff --git a/TINetworking/Sources/Interceptors/EndpointResponseTokenInterceptor.swift b/TINetworking/Sources/Interceptors/EndpointResponseTokenInterceptor.swift index 25a7782f..76171eca 100644 --- a/TINetworking/Sources/Interceptors/EndpointResponseTokenInterceptor.swift +++ b/TINetworking/Sources/Interceptors/EndpointResponseTokenInterceptor.swift @@ -23,7 +23,9 @@ import Alamofire import TIFoundationUtils -open class EndpointResponseTokenInterceptor: DefaultTokenInterceptor>, EndpointRequestRetrier { +open class EndpointResponseTokenInterceptor: DefaultTokenInterceptor>, + EndpointRequestRetrier { + public typealias IsTokenInvalidErrorResultClosure = (EndpointErrorResult) -> Bool public typealias RepairResult = Result> diff --git a/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift b/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift index 4607303e..1467c47c 100644 --- a/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift +++ b/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift @@ -41,7 +41,7 @@ public struct ApplicationJsonBodySerializer: BodySerializer { public func serialize(body: Body?) throws -> ContentTypeData { let mimeType = CommonMediaTypes.applicationJson.rawValue - guard let body = body else { + guard let body else { return (mimeType, Data()) } diff --git a/TINetworking/Sources/Mapping/ResponseContent/EmptyResponseContent.swift b/TINetworking/Sources/Mapping/ResponseContent/EmptyResponseContent.swift index 32aaec1e..301b7358 100644 --- a/TINetworking/Sources/Mapping/ResponseContent/EmptyResponseContent.swift +++ b/TINetworking/Sources/Mapping/ResponseContent/EmptyResponseContent.swift @@ -23,7 +23,7 @@ import Foundation public final class EmptyResponseContent: BaseContent, ResponseContent { - public func decodeResponse(data: Data) throws -> Void { + public func decodeResponse(data: Data) throws { () } } diff --git a/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift b/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift index ec434168..6854acbb 100644 --- a/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift +++ b/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift @@ -28,12 +28,14 @@ open class HeaderParameterEncoding: ParameterEncoding { let key = $1.key let nonEmptyValueComponents = pathComponents(fromKey: key, value: $1.value.value) .filter { !$0.value.isEmpty || (parameters[key]?.allowEmptyValue ?? true) } - $0.merge(nonEmptyValueComponents) { _, last in last } + $0.merge(nonEmptyValueComponents) { _, last in + last + } } } open func pathComponents(fromKey key: String, value: Any?) -> [String: String] { - guard let value = value else { + guard let value else { return [:] } @@ -42,10 +44,14 @@ open class HeaderParameterEncoding: ParameterEncoding { switch value { case let dictionary as [String: Any]: for (nestedKey, value) in dictionary { - components.merge(pathComponents(fromKey: nestedKey, value: value)) { _, last in last } + components.merge(pathComponents(fromKey: nestedKey, value: value)) { _, last in + last + } } + case let array as [Any]: components.updateValue(array.map { "\($0)" }.joined(separator: ","), forKey: key) + default: components.updateValue("\(value)", forKey: key) } diff --git a/TINetworking/Sources/Parameters/Encoding/PathParameterEncoding.swift b/TINetworking/Sources/Parameters/Encoding/PathParameterEncoding.swift index f11c3da5..84895a82 100644 --- a/TINetworking/Sources/Parameters/Encoding/PathParameterEncoding.swift +++ b/TINetworking/Sources/Parameters/Encoding/PathParameterEncoding.swift @@ -29,7 +29,7 @@ open class PathParameterEncoding: BaseUrlParameterEncoding, ParameterEncoding { // MARK: - ParameterEncoding - open func encode(parameters: [String: Parameter]) -> String { + open func encode(parameters: [String: Parameter]) -> String { .render(template: templateUrl, using: encode(parameters: parameters)) } } diff --git a/TINetworking/Sources/Request/EndpointRequest+Serialization.swift b/TINetworking/Sources/Request/EndpointRequest+Serialization.swift index e7ab9d06..858e844c 100644 --- a/TINetworking/Sources/Request/EndpointRequest+Serialization.swift +++ b/TINetworking/Sources/Request/EndpointRequest+Serialization.swift @@ -25,7 +25,8 @@ import Foundation public extension EndpointRequest { func serialize(using serializer: Serializer, - defaultServer: Server) throws -> SerializedRequest where Serializer.Body == Body { + defaultServer: Server) + throws -> SerializedRequest where Serializer.Body == Body { let baseUrl = try (server ?? defaultServer).url(using: customServerVariables) let path = PathParameterEncoding(templateUrl: templatePath).encode(parameters: pathParameters) @@ -47,7 +48,7 @@ public extension EndpointRequest { if let domain = baseUrl.host { cookies = cookieParameters.compactMap { key, value in HTTPCookie(properties: [ - .name : key, + .name: key, .value: value, .domain: domain, .path: path @@ -67,4 +68,3 @@ public extension EndpointRequest { acceptableStatusCodes: acceptableStatusCodes) } } - diff --git a/TINetworking/Sources/Request/SerializedRequest.swift b/TINetworking/Sources/Request/SerializedRequest.swift index 755d9b9f..341dd8ad 100644 --- a/TINetworking/Sources/Request/SerializedRequest.swift +++ b/TINetworking/Sources/Request/SerializedRequest.swift @@ -57,16 +57,16 @@ extension SerializedRequest: Hashable { private var comparableQueryParameters: [String: String] { queryParameters.mapValues(String.init(describing:)) } - + public static func == (lhs: SerializedRequest, rhs: SerializedRequest) -> Bool { lhs.baseURL == rhs.baseURL && - lhs.path == rhs.path && - lhs.method == rhs.method && - lhs.bodyData == rhs.bodyData && - lhs.comparableQueryParameters == rhs.comparableQueryParameters && - lhs.headers == rhs.headers && - lhs.cookies == rhs.cookies && - lhs.acceptableStatusCodes == rhs.acceptableStatusCodes + lhs.path == rhs.path && + lhs.method == rhs.method && + lhs.bodyData == rhs.bodyData && + lhs.comparableQueryParameters == rhs.comparableQueryParameters && + lhs.headers == rhs.headers && + lhs.cookies == rhs.cookies && + lhs.acceptableStatusCodes == rhs.acceptableStatusCodes } public func hash(into hasher: inout Hasher) { diff --git a/TINetworking/Sources/RequestPreprocessors/DefaultEndpointSecurityRequestPreprocessor.swift b/TINetworking/Sources/RequestPreprocessors/DefaultEndpointSecurityRequestPreprocessor.swift index 7d2bc254..c0bf2676 100644 --- a/TINetworking/Sources/RequestPreprocessors/DefaultEndpointSecurityRequestPreprocessor.swift +++ b/TINetworking/Sources/RequestPreprocessors/DefaultEndpointSecurityRequestPreprocessor.swift @@ -42,9 +42,9 @@ open class DefaultSecuritySchemePreprocessor: SecuritySchemePreprocessor { // MARK: - EndpointSecurityRequestPreprocessor - public func preprocess(request: EndpointRequest, - using security: SecurityScheme, - completion: @escaping (Result, Error>) -> Void) -> Cancellable { + public func preprocess(request: EndpointRequest, + using security: SecurityScheme, + completion: @escaping (Result, Error>) -> Void) -> Cancellable { var modifiedRequest = request @@ -62,6 +62,7 @@ open class DefaultSecuritySchemePreprocessor: SecuritySchemePreprocessor { forKey: "Authorization") modifiedRequest.headerParameters = headerParameters + case let .apiKey(parameterLocation, parameterName): switch parameterLocation { case .header: @@ -70,9 +71,11 @@ open class DefaultSecuritySchemePreprocessor: SecuritySchemePreprocessor { forKey: parameterName) modifiedRequest.headerParameters = headerParameters + case .query: modifiedRequest.queryParameters.updateValue(.init(value: value), forKey: parameterName) + case .cookie: modifiedRequest.cookieParameters.updateValue(.init(value: value), forKey: parameterName) diff --git a/TINetworking/Sources/RequestPreprocessors/DefaultSecuritySchemesRequestPreprocessor.swift b/TINetworking/Sources/RequestPreprocessors/DefaultSecuritySchemesRequestPreprocessor.swift index 33b79ce7..58d6ad85 100644 --- a/TINetworking/Sources/RequestPreprocessors/DefaultSecuritySchemesRequestPreprocessor.swift +++ b/TINetworking/Sources/RequestPreprocessors/DefaultSecuritySchemesRequestPreprocessor.swift @@ -38,8 +38,8 @@ open class DefaultEndpointSecurityPreprocessor: EndpointRequestPreprocessor { self.schemePreprocessors = schemePreprocessors } - public func preprocess(request: EndpointRequest, - completion: @escaping (Result, Error>) -> Void) -> Cancellable { + public func preprocess(request: EndpointRequest, + completion: @escaping (Result, Error>) -> Void) -> Cancellable { guard !request.security.compactMap({ $0 }).isEmpty else { completion(.success(request)) @@ -60,13 +60,10 @@ open class DefaultEndpointSecurityPreprocessor: EndpointRequestPreprocessor { return Self.preprocess(request: request, using: endpointSchemes, schemePreprocessors: schemePreprocessors) { [schemePreprocessors] in - switch $0 { - case let .success(modifiedRequest): - completion(.success(modifiedRequest)) - case .failure: - completion(.failure(PreprocessError.unableToSatisfyRequirements(anyOfRequired: request.security, - registeredPreprocessors: schemePreprocessors))) - } + completion($0.mapError { _ in + PreprocessError.unableToSatisfyRequirements(anyOfRequired: request.security, + registeredPreprocessors: schemePreprocessors) + }) } } catch { completion(.failure(error)) @@ -78,11 +75,11 @@ open class DefaultEndpointSecurityPreprocessor: EndpointRequestPreprocessor { schemePreprocessors[scheme] = preprocessor } - private static func preprocess(request: EndpointRequest, - using schemes: SC, - schemePreprocessors: [String: SecuritySchemePreprocessor], - completion: @escaping (Result, Error>) -> Void) -> Cancellable - where SC.Element == [KeyValueTuple] { + private static func preprocess(request: EndpointRequest, + using schemes: SC, + schemePreprocessors: [String: SecuritySchemePreprocessor], + completion: @escaping (Result, Error>) -> Void) + -> Cancellable where SC.Element == [KeyValueTuple] { guard let schemeGroup = schemes.first else { completion(.success(request)) @@ -113,6 +110,7 @@ open class DefaultEndpointSecurityPreprocessor: EndpointRequestPreprocessor { switch $0 { case let .success(modifiedRequest): completion(.success(modifiedRequest)) + case let .failure(error): guard !schemes.isEmpty else { completion(.failure(error)) @@ -129,10 +127,10 @@ open class DefaultEndpointSecurityPreprocessor: EndpointRequestPreprocessor { } } - private static func preprocess(request: EndpointRequest, - with groups: G, - completion: @escaping (Result, Error>) -> Void) -> Cancellable - where G.Element == KeyValueTuple { + private static func preprocess(request: EndpointRequest, + with groups: G, + completion: @escaping (Result, Error>) -> Void) + -> Cancellable where G.Element == KeyValueTuple { guard let group = groups.first else { completion(.success(request)) @@ -148,6 +146,7 @@ open class DefaultEndpointSecurityPreprocessor: EndpointRequestPreprocessor { with: groups.dropFirst(), completion: completion) .add(to: scope) + case let .failure(error): completion(.failure(error)) } diff --git a/TINetworking/Sources/RequestPreprocessors/EndpointRequestPreprocessor.swift b/TINetworking/Sources/RequestPreprocessors/EndpointRequestPreprocessor.swift index ed1c7d16..5b09647e 100644 --- a/TINetworking/Sources/RequestPreprocessors/EndpointRequestPreprocessor.swift +++ b/TINetworking/Sources/RequestPreprocessors/EndpointRequestPreprocessor.swift @@ -23,13 +23,13 @@ import TIFoundationUtils public protocol EndpointRequestPreprocessor { - func preprocess(request: EndpointRequest, - completion: @escaping (Result, Error>) -> Void) -> Cancellable + func preprocess(request: EndpointRequest, + completion: @escaping (Result, Error>) -> Void) -> Cancellable } @available(iOS 13.0.0, *) public extension EndpointRequestPreprocessor { - func preprocess(request: EndpointRequest) async -> Result, Error> { + func preprocess(request: EndpointRequest) async -> Result, Error> { await withTaskCancellableClosure { completion in preprocess(request: request) { completion($0) diff --git a/TINetworking/Sources/RequestPreprocessors/EndpointSecurityRequestPreprocessor.swift b/TINetworking/Sources/RequestPreprocessors/EndpointSecurityRequestPreprocessor.swift index 8dcf2e56..b8c265e0 100644 --- a/TINetworking/Sources/RequestPreprocessors/EndpointSecurityRequestPreprocessor.swift +++ b/TINetworking/Sources/RequestPreprocessors/EndpointSecurityRequestPreprocessor.swift @@ -23,14 +23,16 @@ import TIFoundationUtils public protocol SecuritySchemePreprocessor { - func preprocess(request: EndpointRequest, - using security: SecurityScheme, - completion: @escaping (Result, Error>) -> Void) -> Cancellable + func preprocess(request: EndpointRequest, + using security: SecurityScheme, + completion: @escaping (Result, Error>) -> Void) -> Cancellable } @available(iOS 13.0.0, *) public extension SecuritySchemePreprocessor { - func preprocess(request: EndpointRequest, using security: SecurityScheme) async -> Result, Error> { + func preprocess(request: EndpointRequest, using security: SecurityScheme) + async -> Result, Error> { + await withTaskCancellableClosure { completion in preprocess(request: request, using: security) { completion($0) diff --git a/TINetworking/Sources/SpecEntities/HTTPAuthenticationScheme.swift b/TINetworking/Sources/SpecEntities/HTTPAuthenticationScheme.swift index 16bf0028..6f2c1188 100644 --- a/TINetworking/Sources/SpecEntities/HTTPAuthenticationScheme.swift +++ b/TINetworking/Sources/SpecEntities/HTTPAuthenticationScheme.swift @@ -21,8 +21,8 @@ // public struct HTTPAuthenticationScheme: RawRepresentable, Equatable, Hashable { - public static let basic = HTTPAuthenticationScheme(rawValue: "Basic") - public static let bearer = HTTPAuthenticationScheme(rawValue: "Bearer") + public static let basic = Self(rawValue: "Basic") + public static let bearer = Self(rawValue: "Bearer") public let rawValue: String diff --git a/TINetworking/Sources/SpecEntities/Server.swift b/TINetworking/Sources/SpecEntities/Server.swift index 61f2b3b3..6e712f6b 100644 --- a/TINetworking/Sources/SpecEntities/Server.swift +++ b/TINetworking/Sources/SpecEntities/Server.swift @@ -65,7 +65,9 @@ public struct Server { } let defaultVariablesToApply = self.defaultVariables - .filter { (key, _) in variables.contains { $0.key == key } } + .filter { key, _ in + variables.contains { $0.key == key } + } let defaultParametersTemplate = String.render(template: urlTemplate, using: defaultVariablesToApply) diff --git a/TINetworking/Sources/String+URLExtensions.swift b/TINetworking/Sources/String+URLExtensions.swift index e152ba5a..e1403074 100644 --- a/TINetworking/Sources/String+URLExtensions.swift +++ b/TINetworking/Sources/String+URLExtensions.swift @@ -24,7 +24,7 @@ import Foundation public extension String { var urlEscaped: String { - return addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) ?? self + addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) ?? self } var urlHost: String { diff --git a/run_swiftlint.sh b/run_swiftlint.sh deleted file mode 100644 index decb82b6..00000000 --- a/run_swiftlint.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -readonly CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml - -readonly SWIFTLINT_VERSION=0.39.1 -readonly SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip - -readonly SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME} - -. build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} Downloads --remove-cached - -cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME} - -${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && ${PROJECT_DIR}/Downloads/swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} \ No newline at end of file -- 2.40.1 From 975435bb9099182b555ac1932c9a22d3cb2bbd14 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Fri, 19 May 2023 18:30:53 +0300 Subject: [PATCH 4/7] build: update podspecs --- TIAppleMapUtils/TIAppleMapUtils.podspec | 2 +- TIAuth/TIAuth.podspec | 2 +- TIDeeplink/TIDeeplink.podspec | 2 +- TIDeveloperUtils/TIDeveloperUtils.podspec | 2 +- TIEcommerce/TIEcommerce.podspec | 2 +- TIFoundationUtils/TIFoundationUtils.podspec | 2 +- TIGoogleMapUtils/TIGoogleMapUtils.podspec | 2 +- TIKeychainUtils/TIKeychainUtils.podspec | 2 +- TIMapUtils/TIMapUtils.podspec | 2 +- TIMoyaNetworking/TIMoyaNetworking.podspec | 2 +- TINetworking/TINetworking.podspec | 2 +- TINetworkingCache/TINetworkingCache.podspec | 2 +- TIPagination/TIPagination.podspec | 2 +- TISwiftUICore/TISwiftUICore.podspec | 2 +- TISwiftUtils/TISwiftUtils.podspec | 2 +- TITableKitUtils/TITableKitUtils.podspec | 2 +- TITextProcessing/TITextProcessing.podspec | 2 +- TIUIElements/TIUIElements.podspec | 2 +- TIUIKitCore/TIUIKitCore.podspec | 2 +- TIWebView/TIWebView.podspec | 2 +- TIYandexMapUtils/TIYandexMapUtils.podspec | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/TIAppleMapUtils/TIAppleMapUtils.podspec b/TIAppleMapUtils/TIAppleMapUtils.podspec index 12765b60..482e586a 100644 --- a/TIAppleMapUtils/TIAppleMapUtils.podspec +++ b/TIAppleMapUtils/TIAppleMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIAppleMapUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for map objects clustering and interacting using Apple MapKit.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIAuth/TIAuth.podspec b/TIAuth/TIAuth.podspec index 25cc3121..47cf832f 100644 --- a/TIAuth/TIAuth.podspec +++ b/TIAuth/TIAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIAuth' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Login, registration, confirmation and other related actions' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIDeeplink/TIDeeplink.podspec b/TIDeeplink/TIDeeplink.podspec index a044e042..41f92e26 100644 --- a/TIDeeplink/TIDeeplink.podspec +++ b/TIDeeplink/TIDeeplink.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIDeeplink' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Deeplink service API' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIDeveloperUtils/TIDeveloperUtils.podspec b/TIDeveloperUtils/TIDeveloperUtils.podspec index 9a477cac..83a6fee6 100644 --- a/TIDeveloperUtils/TIDeveloperUtils.podspec +++ b/TIDeveloperUtils/TIDeveloperUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIDeveloperUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Universal web view API' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIEcommerce/TIEcommerce.podspec b/TIEcommerce/TIEcommerce.podspec index dad870ac..144f09d1 100644 --- a/TIEcommerce/TIEcommerce.podspec +++ b/TIEcommerce/TIEcommerce.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIEcommerce' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Cart, products, promocodes, bonuses and other related actions' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index 1e3b38e3..583e9dd5 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIFoundationUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for Foundation framework classes.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIGoogleMapUtils/TIGoogleMapUtils.podspec b/TIGoogleMapUtils/TIGoogleMapUtils.podspec index 6992eedc..801b09e3 100644 --- a/TIGoogleMapUtils/TIGoogleMapUtils.podspec +++ b/TIGoogleMapUtils/TIGoogleMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIGoogleMapUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for map objects clustering and interacting using Google Maps SDK.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIKeychainUtils/TIKeychainUtils.podspec b/TIKeychainUtils/TIKeychainUtils.podspec index e34cf878..9ebea5ad 100644 --- a/TIKeychainUtils/TIKeychainUtils.podspec +++ b/TIKeychainUtils/TIKeychainUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIKeychainUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for Keychain classes.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMapUtils/TIMapUtils.podspec b/TIMapUtils/TIMapUtils.podspec index fa75aa62..96036a21 100644 --- a/TIMapUtils/TIMapUtils.podspec +++ b/TIMapUtils/TIMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMapUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for map objects clustering and interacting.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMoyaNetworking/TIMoyaNetworking.podspec b/TIMoyaNetworking/TIMoyaNetworking.podspec index 1ce1bd6c..b811d1fe 100644 --- a/TIMoyaNetworking/TIMoyaNetworking.podspec +++ b/TIMoyaNetworking/TIMoyaNetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMoyaNetworking' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Moya + Swagger network service.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index 8fb548ed..3a18e429 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworking' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Swagger-frendly networking layer helpers.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworkingCache/TINetworkingCache.podspec b/TINetworkingCache/TINetworkingCache.podspec index ca37139e..0e4abab2 100644 --- a/TINetworkingCache/TINetworkingCache.podspec +++ b/TINetworkingCache/TINetworkingCache.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworkingCache' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Caching results of EndpointRequests.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIPagination/TIPagination.podspec b/TIPagination/TIPagination.podspec index 6a47db18..1f1524d5 100644 --- a/TIPagination/TIPagination.podspec +++ b/TIPagination/TIPagination.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIPagination' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Generic pagination component.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUICore/TISwiftUICore.podspec b/TISwiftUICore/TISwiftUICore.podspec index 3b45089f..ece51891 100644 --- a/TISwiftUICore/TISwiftUICore.podspec +++ b/TISwiftUICore/TISwiftUICore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUICore' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index 58787b20..46432194 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Bunch of useful helpers for Swift development.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITableKitUtils/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index bdba0ea9..453ae91a 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITableKitUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for TableKit classes.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITextProcessing/TITextProcessing.podspec b/TITextProcessing/TITextProcessing.podspec index e0b88558..ac6e4d79 100644 --- a/TITextProcessing/TITextProcessing.podspec +++ b/TITextProcessing/TITextProcessing.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITextProcessing' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'A text processing service helping to get a text mask and a placeholder from incoming regex.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIElements/TIUIElements.podspec b/TIUIElements/TIUIElements.podspec index 48d1b348..9012e215 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIElements' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Bunch of useful protocols and views.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIKitCore/TIUIKitCore.podspec b/TIUIKitCore/TIUIKitCore.podspec index 5e478533..e2a36725 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIKitCore' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIWebView/TIWebView.podspec b/TIWebView/TIWebView.podspec index 6c4bd3b1..5ad974c8 100644 --- a/TIWebView/TIWebView.podspec +++ b/TIWebView/TIWebView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIWebView' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Universal web view API' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIYandexMapUtils/TIYandexMapUtils.podspec b/TIYandexMapUtils/TIYandexMapUtils.podspec index 5b64ab72..e307c62d 100644 --- a/TIYandexMapUtils/TIYandexMapUtils.podspec +++ b/TIYandexMapUtils/TIYandexMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIYandexMapUtils' - s.version = '1.43.1' + s.version = '1.44.0' s.summary = 'Set of helpers for map objects clustering and interacting using Yandex Maps SDK.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } -- 2.40.1 From e7517c23f879894bcec7f7567a299de7919266bb Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Mon, 22 May 2023 11:57:27 +0300 Subject: [PATCH 5/7] build: update podspec version --- Plugins/TISwiftLintPlugin/plugin.swift | 2 +- TIAppleMapUtils/TIAppleMapUtils.podspec | 2 +- TIAuth/TIAuth.podspec | 2 +- TIDeeplink/TIDeeplink.podspec | 2 +- TIDeveloperUtils/TIDeveloperUtils.podspec | 2 +- TIEcommerce/TIEcommerce.podspec | 2 +- TIFoundationUtils/TIFoundationUtils.podspec | 2 +- TIGoogleMapUtils/TIGoogleMapUtils.podspec | 2 +- TIKeychainUtils/TIKeychainUtils.podspec | 2 +- TIMapUtils/TIMapUtils.podspec | 2 +- TIMoyaNetworking/TIMoyaNetworking.podspec | 2 +- TINetworking/TINetworking.podspec | 2 +- TINetworkingCache/TINetworkingCache.podspec | 2 +- TIPagination/TIPagination.podspec | 2 +- TISwiftUICore/TISwiftUICore.podspec | 2 +- TISwiftUtils/TISwiftUtils.podspec | 2 +- TITableKitUtils/TITableKitUtils.podspec | 2 +- TITextProcessing/TITextProcessing.podspec | 2 +- TIUIElements/TIUIElements.podspec | 2 +- TIUIKitCore/TIUIKitCore.podspec | 2 +- TIWebView/TIWebView.podspec | 2 +- TIYandexMapUtils/TIYandexMapUtils.podspec | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Plugins/TISwiftLintPlugin/plugin.swift b/Plugins/TISwiftLintPlugin/plugin.swift index c707e90c..70f3964d 100644 --- a/Plugins/TISwiftLintPlugin/plugin.swift +++ b/Plugins/TISwiftLintPlugin/plugin.swift @@ -42,7 +42,7 @@ struct SwiftLintPlugin: BuildToolPlugin { "SCRIPT_INPUT_FILE_COUNT": "1", "SCRIPT_INPUT_FILE_0": target.directory.removingLastComponent().lastComponent, // "FORCE_LINT": "1", // Lint all files in target (not only modified) - "AUTOCORRECT": "1" // + "AUTOCORRECT": "1" ], outputFilesDirectory: context.package.directory) ] diff --git a/TIAppleMapUtils/TIAppleMapUtils.podspec b/TIAppleMapUtils/TIAppleMapUtils.podspec index 482e586a..207b515e 100644 --- a/TIAppleMapUtils/TIAppleMapUtils.podspec +++ b/TIAppleMapUtils/TIAppleMapUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIAuth/TIAuth.podspec b/TIAuth/TIAuth.podspec index 47cf832f..051f92ec 100644 --- a/TIAuth/TIAuth.podspec +++ b/TIAuth/TIAuth.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '13.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIDeeplink/TIDeeplink.podspec b/TIDeeplink/TIDeeplink.podspec index 41f92e26..a1e237e2 100644 --- a/TIDeeplink/TIDeeplink.podspec +++ b/TIDeeplink/TIDeeplink.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] sources = '/Sources/**/*' if ENV["DEVELOPMENT_INSTALL"] # installing using :path => diff --git a/TIDeveloperUtils/TIDeveloperUtils.podspec b/TIDeveloperUtils/TIDeveloperUtils.podspec index 83a6fee6..7731de9d 100644 --- a/TIDeveloperUtils/TIDeveloperUtils.podspec +++ b/TIDeveloperUtils/TIDeveloperUtils.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIEcommerce/TIEcommerce.podspec b/TIEcommerce/TIEcommerce.podspec index 144f09d1..5cfa9c42 100644 --- a/TIEcommerce/TIEcommerce.podspec +++ b/TIEcommerce/TIEcommerce.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index 583e9dd5..6dbc21c8 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] sources = '**/Sources/**/*.swift' if ENV["DEVELOPMENT_INSTALL"] # installing using :path => diff --git a/TIGoogleMapUtils/TIGoogleMapUtils.podspec b/TIGoogleMapUtils/TIGoogleMapUtils.podspec index 801b09e3..4e9fe29f 100644 --- a/TIGoogleMapUtils/TIGoogleMapUtils.podspec +++ b/TIGoogleMapUtils/TIGoogleMapUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '12.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIKeychainUtils/TIKeychainUtils.podspec b/TIKeychainUtils/TIKeychainUtils.podspec index 9ebea5ad..eaad9f74 100644 --- a/TIKeychainUtils/TIKeychainUtils.podspec +++ b/TIKeychainUtils/TIKeychainUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIMapUtils/TIMapUtils.podspec b/TIMapUtils/TIMapUtils.podspec index 96036a21..f5097805 100644 --- a/TIMapUtils/TIMapUtils.podspec +++ b/TIMapUtils/TIMapUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIMoyaNetworking/TIMoyaNetworking.podspec b/TIMoyaNetworking/TIMoyaNetworking.podspec index b811d1fe..281c1fc4 100644 --- a/TIMoyaNetworking/TIMoyaNetworking.podspec +++ b/TIMoyaNetworking/TIMoyaNetworking.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/**/Sources/**/*' diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index 3a18e429..84691f6f 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TINetworkingCache/TINetworkingCache.podspec b/TINetworkingCache/TINetworkingCache.podspec index 0e4abab2..6fbf7bec 100644 --- a/TINetworkingCache/TINetworkingCache.podspec +++ b/TINetworkingCache/TINetworkingCache.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIPagination/TIPagination.podspec b/TIPagination/TIPagination.podspec index 1f1524d5..f750d137 100644 --- a/TIPagination/TIPagination.podspec +++ b/TIPagination/TIPagination.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TISwiftUICore/TISwiftUICore.podspec b/TISwiftUICore/TISwiftUICore.podspec index ece51891..743a1454 100644 --- a/TISwiftUICore/TISwiftUICore.podspec +++ b/TISwiftUICore/TISwiftUICore.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '13.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index 46432194..62a914a5 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '9.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] sources = 'Sources/**/*.swift' if ENV["DEVELOPMENT_INSTALL"] # installing using :path => diff --git a/TITableKitUtils/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index 453ae91a..b7c058b6 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TITextProcessing/TITextProcessing.podspec b/TITextProcessing/TITextProcessing.podspec index ac6e4d79..974fe575 100644 --- a/TITextProcessing/TITextProcessing.podspec +++ b/TITextProcessing/TITextProcessing.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '10.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] sources = '/Sources/**/*' diff --git a/TIUIElements/TIUIElements.podspec b/TIUIElements/TIUIElements.podspec index 9012e215..4615979b 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] sources = '/Sources/**/*' if ENV["DEVELOPMENT_INSTALL"] # installing using :path => diff --git a/TIUIKitCore/TIUIKitCore.podspec b/TIUIKitCore/TIUIKitCore.podspec index e2a36725..085e975d 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' s.framework = 'UIKit' diff --git a/TIWebView/TIWebView.podspec b/TIWebView/TIWebView.podspec index 5ad974c8..05d8491f 100644 --- a/TIWebView/TIWebView.podspec +++ b/TIWebView/TIWebView.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '11.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIYandexMapUtils/TIYandexMapUtils.podspec b/TIYandexMapUtils/TIYandexMapUtils.podspec index e307c62d..927375f9 100644 --- a/TIYandexMapUtils/TIYandexMapUtils.podspec +++ b/TIYandexMapUtils/TIYandexMapUtils.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } s.ios.deployment_target = '12.0' - s.swift_versions = ['5.3'] + s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' -- 2.40.1 From 4f0c9a8ed1cdc00ef8527e4c07d99a28a25af4b7 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Mon, 22 May 2023 13:35:04 +0300 Subject: [PATCH 6/7] build: update min deployment target for Xcode 14 --- TIFoundationUtils/TIFoundationUtils.podspec | 2 +- TIMapUtils/TIMapUtils.podspec | 2 +- TINetworking/TINetworking.podspec | 2 +- TIPagination/TIPagination.podspec | 2 +- TISwiftUtils/TISwiftUtils.podspec | 2 +- TITextProcessing/TITextProcessing.podspec | 2 +- build-scripts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index 6dbc21c8..b585a5eb 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' } s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '11.0' s.swift_versions = ['5.7'] sources = '**/Sources/**/*.swift' diff --git a/TIMapUtils/TIMapUtils.podspec b/TIMapUtils/TIMapUtils.podspec index f5097805..be12acde 100644 --- a/TIMapUtils/TIMapUtils.podspec +++ b/TIMapUtils/TIMapUtils.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' } s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '11.0' s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index 84691f6f..271cfd64 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' } s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '11.0' s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TIPagination/TIPagination.podspec b/TIPagination/TIPagination.podspec index f750d137..deafca04 100644 --- a/TIPagination/TIPagination.podspec +++ b/TIPagination/TIPagination.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' } s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '11.0' s.swift_versions = ['5.7'] s.source_files = s.name + '/Sources/**/*' diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index 62a914a5..4ba217e8 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' } s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '9.0' + s.ios.deployment_target = '11.0' s.swift_versions = ['5.7'] sources = 'Sources/**/*.swift' diff --git a/TITextProcessing/TITextProcessing.podspec b/TITextProcessing/TITextProcessing.podspec index 974fe575..420cf3d0 100644 --- a/TITextProcessing/TITextProcessing.podspec +++ b/TITextProcessing/TITextProcessing.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' } s.source = { :git => 'https://git.svc.touchin.ru/TouchInstinct/LeadKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '11.0' s.swift_versions = ['5.7'] sources = '/Sources/**/*' diff --git a/build-scripts b/build-scripts index b843196f..7d3f2794 160000 --- a/build-scripts +++ b/build-scripts @@ -1 +1 @@ -Subproject commit b843196f3c9d9eda4ec8eeba29bf5cc859f55f18 +Subproject commit 7d3f2794bcdbf03c592f864950c1e6ff24e423b5 -- 2.40.1 From 7fd33b6157e9b769907c862fa184ba839e3c361e Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 24 May 2023 09:28:20 +0300 Subject: [PATCH 7/7] build: update build scripts, disable autocorrection dy default --- Plugins/TISwiftLintPlugin/plugin.swift | 2 +- build-scripts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/TISwiftLintPlugin/plugin.swift b/Plugins/TISwiftLintPlugin/plugin.swift index 70f3964d..5a2d4188 100644 --- a/Plugins/TISwiftLintPlugin/plugin.swift +++ b/Plugins/TISwiftLintPlugin/plugin.swift @@ -42,7 +42,7 @@ struct SwiftLintPlugin: BuildToolPlugin { "SCRIPT_INPUT_FILE_COUNT": "1", "SCRIPT_INPUT_FILE_0": target.directory.removingLastComponent().lastComponent, // "FORCE_LINT": "1", // Lint all files in target (not only modified) - "AUTOCORRECT": "1" +// "AUTOCORRECT": "1" ], outputFilesDirectory: context.package.directory) ] diff --git a/build-scripts b/build-scripts index 7d3f2794..39109c6e 160000 --- a/build-scripts +++ b/build-scripts @@ -1 +1 @@ -Subproject commit 7d3f2794bcdbf03c592f864950c1e6ff24e423b5 +Subproject commit 39109c6e6032b2a59f4cdd7b80ac06c4dc8b33c0 -- 2.40.1