[GH-ISSUE #409] Xcode 9 Swift 4.0 support #259

Closed
opened 2026-03-03 16:47:09 +03:00 by kerem · 1 comment
Owner

Originally created by @neoneye on GitHub (Sep 13, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/409

Description:

Recently people have begun migrating their projects from Xcode8 to Xcode9 and from Swift3 to Swift4. OAuthSwift is an important component.

With Xcode9 and swift4 enabled, I'm getting errors like these:

var userInfo: [AnyHashable: Any] = [
    NSLocalizedDescriptionKey: localizedDescription
]
...
let error = NSError(domain: OAuthSwiftError.Domain, code: badRequestCode, userInfo: userInfo)

Here Xcode wants AnyHashable to be changed to String.

Xcode also wants OAuthSwiftDataEncoding to be changed from being internal to being public.

OAuth Provider (Twitter, Github, ..):

none

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Manually

Library version:

  • head
  • v1.0.0
  • v0.6
  • other: (Please fill in the version you are using.)

Xcode version:

  • 9.0 (9A235) goldmaster (Swift 4.0)

  • 8.0 (Swift 3.0)

  • 8.0 (Swift 2.3)

  • 7.3.1

  • objective c

Originally created by @neoneye on GitHub (Sep 13, 2017). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/409 ### Description: Recently people have begun migrating their projects from Xcode8 to Xcode9 and from Swift3 to Swift4. OAuthSwift is an important component. With Xcode9 and swift4 enabled, I'm getting errors like these: ``` var userInfo: [AnyHashable: Any] = [ NSLocalizedDescriptionKey: localizedDescription ] ... let error = NSError(domain: OAuthSwiftError.Domain, code: badRequestCode, userInfo: userInfo) ``` Here Xcode wants `AnyHashable` to be changed to `String`. Xcode also wants `OAuthSwiftDataEncoding` to be changed from being internal to being public. ### OAuth Provider (Twitter, Github, ..): none ### OAuth Version: - [ ] Version 1 - [ ] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x] CocoaPods - [ ] Manually ### Library version: - [x] head - [ ] v1.0.0 - [ ] v0.6 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [x] 9.0 (9A235) goldmaster (Swift 4.0) - [ ] 8.0 (Swift 3.0) - [ ] 8.0 (Swift 2.3) - [ ] 7.3.1 - [ ] objective c
kerem closed this issue 2026-03-03 16:47:10 +03:00
Author
Owner

@phimage commented on GitHub (Sep 16, 2017):

Hi, not released yet on cocoapod or tagged, but head code use swift 4 thanks to nighthawk

A swift 3 branch is also created

<!-- gh-comment-id:329963910 --> @phimage commented on GitHub (Sep 16, 2017): Hi, not released yet on cocoapod or tagged, but head code use swift 4 thanks to nighthawk A swift 3 branch is also created
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#259
No description provided.