mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #440] OAuthSwift Objective-C interface not generated with Swift 4 #287
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#287
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alfogrillo on GitHub (Mar 2, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/440
Originally assigned to: @phimage on GitHub.
Compiling the pod with Swift 4, the Objective-C interface is not generated.
When i try to build with Swift 3.2 the build fails because a missing
filterfunction on a dictionary.The fix is quite simple. In the file
OAuthSwiftHTTPRequestwe have to refactor the line239finalParameters = parameters.filter { key, _ in !key.hasPrefix("oauth_") }with something like this:
parameters.filter { key, _ in !key.hasPrefix("oauth_") }.forEach { finalParameters[$0] = $1 }When the pod is compiled with Swift 3.2 the Objective-C interface is correctly generated.
Could I submit a pull request?
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
9.0 (Swift 4.0)
9.0 (Swift 3.2)
objective c
@phimage commented on GitHub (Mar 4, 2018):
Hi
I prefer to keep clean swift 4 code, not restore tricky code.
So I make a Dictionary extension to add filter
let me know if this work for you
@alfogrillo commented on GitHub (Mar 4, 2018):
Hi @phimage ,
It works perfectly! :-)
Thanks