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

change init of Strings dictionary in iOS in TrikotHttpResponse #220

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

ChristopheTremblay
Copy link
Contributor

Description

Changed the syntax to build a String dictionary in iOS

Motivation and Context

For some reason, the syntax used before to init the Strings map in TrikotHttpError causes error in building my iOS app.

ios/Pods/Trikot/trikot-http/swift-extensions/TrikotHttpResponse.swift:16:23: cannot call value of non-function type '[AnyHashable : String.Type]'

var headers = [String: String]()

How Has This Been Tested?

The app is not working locally without this change. So fixing it locally allowed me to build the app.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

@@ -13,7 +13,7 @@ public class TrikotHttpResponse: NSObject, HttpResponse {

@objc
public init(data: Data?, response: URLResponse?) {
var headers = [String: String]()
var headers: [String: String] = [:]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ChristopheTremblay ChristopheTremblay changed the title change init of Strings dictionary in iOS change init of Strings dictionary in iOS in TrikotHttpResponse Apr 12, 2024
@ChristopheTremblay ChristopheTremblay merged commit 2ed7dbc into master Apr 12, 2024
1 check passed
@ChristopheTremblay ChristopheTremblay deleted the fix/http-response-init branch April 12, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants