Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(swift5): fix compile error from Alamofire 5.10 #97

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,10 @@ jobs:
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['workspace']['schemes'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build Package with xcodebuild
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
xcodebuild -scheme $scheme -destination 'platform=iOS Simulator,name=iPhone 16'
run: xcodebuild -scheme ApiVideoClient -destination 'platform=iOS Simulator,name=iPhone 16'
- name: Build Example
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
xcodebuild clean build -project Example/Example.xcodeproj -scheme $scheme -sdk iphoneos
run: xcodebuild clean build -project Example/Example.xcodeproj -scheme ApiVideoClient -sdk iphoneos

cocoapods:
name: Verify cocopods podspec
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/oas_apivideo.yaml-defaut-cli.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d05425d4fb2c3a73804ed5a27232eda6751260b0947f6b4c736cc96df300103
6f374764cf476ad001123c84953d1980aaf6bc352573020d111594ab74058bf6
4 changes: 3 additions & 1 deletion Sources/AlamofireImplementations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ extension JSONDataEncoding: ParameterEncoding {
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
let urlRequest = try urlRequest.asURLRequest()

return encode(urlRequest, with: parameters)
// Alamofire 5.10 changed type of Parameters so that it is no longer equivalent to [String: Any]
// cast this type so that the call to encode is not recursive
return encode(urlRequest, with: parameters as [String: Any]?)
}
}
Loading