Skip to content

Commit

Permalink
II-15-[bump pods]
Browse files Browse the repository at this point in the history
  • Loading branch information
spopovshakuro committed Dec 30, 2024
1 parent 6978c41 commit f41c535
Show file tree
Hide file tree
Showing 15 changed files with 103 additions and 70 deletions.
3 changes: 1 addition & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
swiftlint_version: 0.43.1
swiftlint_version: 0.57.1

excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
Expand Down Expand Up @@ -64,7 +64,6 @@ opt_in_rules:
- force_unwrapping
- identical_operands
# - indentation_width # disabled, because multiline arguments are not recognized properly
- inert_defer
- last_where
- legacy_random
- let_var_whitespace
Expand Down
6 changes: 4 additions & 2 deletions HTTPClient_Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_STRICT_CONCURRENCY = complete;
};
name = Debug;
};
Expand Down Expand Up @@ -433,6 +434,7 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_STRICT_CONCURRENCY = complete;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -446,7 +448,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = MW2UF479VW;
INFOPLIST_FILE = "$(SRCROOT)/HTTPClient_Example/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -467,7 +469,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = MW2UF479VW;
INFOPLIST_FILE = "$(SRCROOT)/HTTPClient_Example/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
13 changes: 7 additions & 6 deletions HTTPClient_Example/HTTPClient/ExampleHTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import Alamofire
import Foundation
import HTTPClient_Framework

internal class ExampleHTTPClient: HTTPClient {
internal final class ExampleHTTPClient: HTTPClientProtocol {

internal init() {
super.init(name: "ExampleHTTPClient", logger: ExampleHTTPLogger())
}
internal let httpClient: HTTPClient

internal override func commonHeaders() -> [HTTPHeader] {
return []
internal init() {
self.httpClient = HTTPClient(name: "ExampleHTTPClient",
configuration: nil,
logger: ExampleHTTPLogger(),
commonHeaders: [])
}

}
20 changes: 9 additions & 11 deletions HTTPClient_Example/UI/ExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private extension ExampleViewController {
urlQueryParameters: nil,
bodyParameters: nil)
request = client.sendRequest(options: requestOptions, completion: { [weak self] (result) in
DispatchQueue.main.async(execute: {
Task(operation: { @MainActor [weak self] in
guard let strongSelf = self else {
return
}
Expand All @@ -78,22 +78,20 @@ private extension ExampleViewController {
parser: ExampleParser(),
urlQueryParameters: nil,
bodyParameters: nil)
Task { @MainActor [weak self] in
let result = await self?.client.sendRequest(options: requestOptions)
guard let strongResult = result, let strongSelf = self else {
return
}
strongSelf.activityIndicator.stopAnimating()
switch strongResult {
let httpClient = client
Task(operation: { @MainActor [weak self] in
let result = await httpClient.sendRequest(options: requestOptions)
self?.activityIndicator.stopAnimating()
switch result {
case .success(let contributors):
strongSelf.contributors = contributors
strongSelf.tableView.reloadData()
self?.contributors = contributors
self?.tableView.reloadData()
case .cancelled:
break
case .failure(let error):
print(error)
}
}
})
}

}
6 changes: 4 additions & 2 deletions HTTPClient_Framework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_STRICT_CONCURRENCY = complete;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -355,6 +356,7 @@
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_STRICT_CONCURRENCY = complete;
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -373,7 +375,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = HTTPClient_Framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -399,7 +401,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = HTTPClient_Framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion HTTPClient_Framework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.2.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
22 changes: 16 additions & 6 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '13.0'
platform :ios, '15.0'

use_frameworks!

workspace 'HTTPClient'

target 'HTTPClient_Framework' do
project 'HTTPClient_Framework.xcodeproj'
pod 'Shakuro.CommonTypes', '1.1.6'
pod 'Alamofire', '5.9.1'
pod 'Shakuro.CommonTypes', '1.9.5'
pod 'Alamofire', '5.10.2'
end

target 'HTTPClient_Example' do
project 'HTTPClient_Example.xcodeproj'
pod 'SwiftLint', '0.43.1'
pod 'Shakuro.CommonTypes', '1.1.6'
pod 'Alamofire', '5.9.1'
pod 'SwiftLint', '0.57.1'
pod 'Shakuro.CommonTypes', '1.9.5'
pod 'Alamofire', '5.10.2'
end

post_install do |installer|

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end

end
22 changes: 11 additions & 11 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- Alamofire (5.9.1)
- Shakuro.CommonTypes (1.1.5)
- SwiftLint (0.43.1)
- Alamofire (5.10.2)
- Shakuro.CommonTypes (1.9.5)
- SwiftLint (0.57.1)

DEPENDENCIES:
- Alamofire (= 5.9.1)
- Shakuro.CommonTypes (= 1.1.5)
- SwiftLint (= 0.43.1)
- Alamofire (= 5.10.2)
- Shakuro.CommonTypes (= 1.9.5)
- SwiftLint (= 0.57.1)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
Expand All @@ -15,10 +15,10 @@ SPEC REPOS:
- SwiftLint

SPEC CHECKSUMS:
Alamofire: f36a35757af4587d8e4f4bfa223ad10be2422b8c
Shakuro.CommonTypes: 96dacfa3bd4688d1313dcfe78fa4df56d0a936b0
SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
Shakuro.CommonTypes: 68e5a32e3f2ec4c6c4513aa2a211427b5472b785
SwiftLint: 92196976e597b9afec5dbe374810103e6c1d9d7c

PODFILE CHECKSUM: 451cab521db43d46b19d505f16b9c512b8c2a741
PODFILE CHECKSUM: b5bdd6efa2f4203d759a6e1131a2b00b74649b7b

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Shakuro HTTPClient](Resources/title_image.png)
<br><br>
# HTTPClient
![Version](https://img.shields.io/badge/version-1.1.4-blue.svg)
![Version](https://img.shields.io/badge/version-1.2.0-blue.svg)
![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg)
![License MIT](https://img.shields.io/badge/license-MIT-green.svg)

Expand All @@ -16,8 +16,8 @@ HTTPClient is a Swift library designed to abstract away access to Alamofire. The

## Requirements

- iOS 13.0+
- Xcode 15.0+
- iOS 15.0+
- Xcode 16.0+
- Swift 5.0+

## Installation
Expand Down
10 changes: 5 additions & 5 deletions Shakuro.HTTPClient.podspec
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Pod::Spec.new do |s|

s.name = 'Shakuro.HTTPClient'
s.version = '1.1.6'
s.version = '1.2.0'
s.summary = 'HTTP client for iOS'
s.homepage = 'https://github.com/shakurocom/HTTPClient'
s.license = { :type => "MIT", :file => "LICENSE.md" }
s.authors = {'apopov1988' => '[email protected]', 'wwwpix' => '[email protected]'}
s.source = { :git => 'https://github.com/shakurocom/HTTPClient.git', :tag => s.version }
s.swift_versions = ['5.1', '5.2', '5.3', '5.4', '5.5', '5.6']
s.swift_versions = ['5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.9']
s.source_files = 'Source/*'
s.ios.deployment_target = '13.0'
s.ios.deployment_target = '15.0'

s.framework = "Foundation"
s.dependency "Alamofire", "~> 5.9.1"
s.dependency "Shakuro.CommonTypes", "~> 1.1"
s.dependency "Alamofire", "~> 5.10.2"
s.dependency "Shakuro.CommonTypes", "~> 1.9.5"

end
6 changes: 3 additions & 3 deletions Source/HTTPClient.BodyParameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import Foundation
extension HTTPClient {

/// Sets appropriate value for 'Content-Type' header.
public enum BodyParameters: CustomStringConvertible {
public enum BodyParameters: CustomStringConvertible, Sendable {

/// formData; URLEncoding with destination of httpBody
case httpBody(arrayBrakets: Bool, parameters: [String: Any])
case json(parameters: Any)
case httpBody(arrayBrakets: Bool, parameters: [String: any Sendable])
case json(parameters: any Sendable)

public var description: String {
switch self {
Expand Down
4 changes: 2 additions & 2 deletions Source/HTTPClient.RequestOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension HTTPClient {
public let endpoint: HTTPClientAPIEndPoint
public let method: Alamofire.HTTPMethod
public let parser: ParserType
public let urlQueryParameters: [String: Any]?
public let urlQueryParameters: [String: any Sendable]?
public let urlQueryParametersAddArrayBrackets: Bool
public let bodyParameters: BodyParameters?
/// Headers will be applied in this order (overriding previous ones if key is the same):
Expand All @@ -32,7 +32,7 @@ extension HTTPClient {
public init(endpoint: HTTPClientAPIEndPoint,
method: Alamofire.HTTPMethod,
parser: ParserType,
urlQueryParameters: [String: Any]? = nil,
urlQueryParameters: [String: any Sendable]? = nil,
urlQueryParametersAddArrayBrackets: Bool = false,
bodyParameters: BodyParameters? = nil,
headers: [Alamofire.HTTPHeader] = [ContentType.applicationJSON.acceptHeader()],
Expand Down
Loading

0 comments on commit f41c535

Please sign in to comment.