[GH-ISSUE #695] Connot Run on Linux #452

Closed
opened 2026-03-03 16:48:46 +03:00 by kerem · 3 comments
Owner

Originally created by @underthestars-zhy on GitHub (Mar 12, 2022).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/695

Description:

OAuth Provider? (Twitter, Github, ..):

Onedrive

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • [] iOS :
  • OSX :
  • TVOS :
  • WatchOS :
  • Linux: centos 7.6

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.1.0
  • v2.0.0
  • v1.4.1
  • other: (Please fill in the version you are using.)

Xcode version:

  • 11.4 (Swift 5.2)

  • 11.x (Swift 5.1)

  • 10.x (Swift 5.0)

  • 12

  • objective c

Bug

/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:14:39: error: cannot find type 'NSExtensionContext' in scope
fileprivate var extensionContext: NSExtensionContext
^~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:16:35: error: cannot find type 'NSExtensionContext' in scope
public init(extensionContext: NSExtensionContext) {
^~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:20:6: error: Objective-C interoperability is disabled
@objc open func handle(_ url: URL) {
~^~~~~

/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:21:55: error: 'nil' requires a contextual type
extensionContext.open(url, completionHandler: nil)
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/OAuthSwiftOpenURLExternally.swift:24:6: error: Objective-C interoperability is disabled
@objc open func handle(_ url: URL) {
~^~~~~

/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/OAuthWebViewController.swift:39:36: error: cannot find type 'OAuthViewController' in scope
open class OAuthWebViewController: OAuthViewController, OAuthSwiftURLHandlerType {
^~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/NSError+OAuthSwift.swift:62:63: error: type of expression is ambiguous without more context
let errorCode = jsonDic["error"]?["code"] as? Int
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/NSError+OAuthSwift.swift:63:75: error: type of expression is ambiguous without more context
let errorSubCode = jsonDic["error"]?["error_subcode"] as? Int
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:13:2: error: Objective-C interoperability is disabled
@objc public protocol OAuthSwiftRequestHandle {
~^~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:436:56: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
public var configuration = URLSessionConfiguration.default
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:439:31: error: cannot find type 'URLSessionDelegate' in scope
public weak var delegate: URLSessionDelegate?
^~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:92:38: error: cannot find type 'URLRequest' in scope
open func makeRequest(_ request: URLRequest) -> OAuthSwiftHTTPRequest {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:58:31: error: cannot find type 'URLRequest' in scope
convenience init(request: URLRequest, paramsLocation: ParamsLocation = .authorizationHeader, sessionFactory: URLSessionFactory = .default) {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:93:54: error: extra argument 'request' in call
let request = OAuthSwiftHTTPRequest(request: request, paramsLocation: self.paramsLocation, sessionFactory: self.sessionFactory)
^~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:93:45: error: missing argument for parameter 'url' in call
let request = OAuthSwiftHTTPRequest(request: request, paramsLocation: self.paramsLocation, sessionFactory: self.sessionFactory)
^
url: <#URL#>,
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:54:17: note: 'init(url:method:parameters:paramsLocation:httpBody:headers:sessionFactory:)' declared here
convenience init(url: URL, method: Method = .GET, parameters: OAuthSwift.Parameters = [:], paramsLocation: ParamsLocation = .authorizationHeader, httpBody: Data? = nil, headers: OAuthSwift.Headers = [:], sessionFactory: URLSessionFactory = .default) {
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:114:39: error: cannot find 'arc4random' in scope
let boundary = "AS-boundary-(arc4random())-(arc4random())"
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:114:55: error: cannot find 'arc4random' in scope
let boundary = "AS-boundary-(arc4random())-(arc4random())"
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:34:46: error: cannot find type 'URLRequest' in scope
case requestError(error: Error, request: URLRequest)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:38:54: error: cannot find type 'URLRequest' in scope
case authorizationPending(error: Error, request: URLRequest)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:40:42: error: cannot find type 'URLRequest' in scope
case slowDown(error: Error, request: URLRequest)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:42:46: error: cannot find type 'URLRequest' in scope
case accessDenied(error: Error, request: URLRequest)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:77:15: error: type '_ErrorCodeProtocol' has no member 'requestError'
case .requestError: return Code.requestError
~^~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:78:15: error: type '_ErrorCodeProtocol' has no member 'authorizationPending'
case .authorizationPending: return Code.authorizationPending
~^~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:79:15: error: type '_ErrorCodeProtocol' has no member 'slowDown'
case .slowDown: return Code.slowDown
~^~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:80:15: error: type 'ErrorCodeProtocol' has no member 'accessDenied'
case .accessDenied: return Code.accessDenied
~^~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:87:35: error: '
' can only appear in a pattern or on the left side of an assignment
case .requestError(let e, ): return e
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:88:43: error: '
' can only appear in a pattern or on the left side of an assignment
case .authorizationPending(let e, ): return e
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:89:31: error: '
' can only appear in a pattern or on the left side of an assignment
case .slowDown(let e, ): return e
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:90:35: error: '
' can only appear in a pattern or on the left side of an assignment
case .accessDenied(let e, ): return e
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:119:35: error: '
' can only appear in a pattern or on the left side of an assignment
case .requestError(let e, _): return "requestError[(e)]"
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:120:15: error: type '_ErrorCodeProtocol' has no member 'slowDown'
case .slowDown : return "slowDown"
~^~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:121:15: error: type '_ErrorCodeProtocol' has no member 'accessDenied'
case .accessDenied : return "accessDenied"
~^~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:122:15: error: type '_ErrorCodeProtocol' has no member 'authorizationPending'
case .authorizationPending: return "authorizationPending"
~^~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:156:15: error: type '_ErrorCodeProtocol' has no member 'requestError'
case .requestError(let e, let request): return ["error": e, "request": request]
~^~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:157:15: error: type '_ErrorCodeProtocol' has no member 'authorizationPending'
case .authorizationPending(let e, let request): return ["error": e, "request": request]
~^~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:158:15: error: type '_ErrorCodeProtocol' has no member 'slowDown'
case .slowDown(let e, let request): return ["error": e, "request": request]
~^~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:159:15: error: type '_ErrorCodeProtocol' has no member 'accessDenied'
case .accessDenied(let e, let request): return ["error": e, "request": request]
~^~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:42:26: error: cannot find type 'URLRequest' in scope
private var request: URLRequest?
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:43:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var task: URLSessionTask?
^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:44:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var session: URLSession!
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:117:101: error: cannot find type 'URLRequest' in scope
public static func completionHandler(completionHandler completion: CompletionHandler?, request: URLRequest, data: Data?, resp: URLResponse?, error: Error?) {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:117:132: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public static func completionHandler(completionHandler completion: CompletionHandler?, request: URLRequest, data: Data?, resp: URLResponse?, error: Error?) {
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:223:39: error: cannot find type 'URLRequest' in scope
open func makeRequest() throws -> URLRequest {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:227:59: error: cannot find type 'URLRequest' in scope
open class func makeRequest(config: Config) throws -> URLRequest {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:244:74: error: cannot find type 'URLRequest' in scope
paramsLocation: ParamsLocation = .authorizationHeader) throws -> URLRequest {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:267:74: error: cannot find type 'URLRequest' in scope
paramsLocation: ParamsLocation = .authorizationHeader) throws -> URLRequest {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:263:24: error: cannot find type 'URLRequest' in scope
request: inout URLRequest,
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:317:32: error: cannot find type 'URLRequest' in scope
public var urlRequest: URLRequest
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:350:33: error: cannot find type 'URLRequest' in scope
public init(urlRequest: URLRequest, parameters: OAuthSwift.Parameters = [:], paramsLocation: ParamsLocation = .authorizationHeader, dataEncoding: String.Encoding = OAuthSwiftDataEncoding, sessionFactory: URLSessionFactory = .default) {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:450:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func build() -> URLSession {
^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:59:46: error: extra argument 'urlRequest' in call
self.init(config: Config(urlRequest: request, paramsLocation: paramsLocation, sessionFactory: sessionFactory))
^~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:59:33: error: missing arguments for parameters 'url', 'parameters' in call
self.init(config: Config(urlRequest: request, paramsLocation: paramsLocation, sessionFactory: sessionFactory))
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:340:16: note: 'init(url:httpMethod:httpBody:headers:timeoutInterval:httpShouldHandleCookies:parameters:paramsLocation:dataEncoding:sessionFactory:)' declared here
public init(url: URL, httpMethod: Method = .GET, httpBody: Data? = nil, headers: OAuthSwift.Headers = [:], timeoutInterval: TimeInterval = 60, httpShouldHandleCookies: Bool = false, parameters: OAuthSwift.Parameters, paramsLocation: ParamsLocation = .authorizationHeader, dataEncoding: String.Encoding = OAuthSwiftDataEncoding, sessionFactory: URLSessionFactory = .default) {
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:74:28: error: 'nil' requires a contextual type
self.request = nil
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:91:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
let completionHandler: (Data?, URLResponse?, Error?) -> Void = { data, resp, error in
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:98:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
self.task = self.session.dataTask(with: usedRequest, completionHandler: completionHandler)
~~~~~~~~~~~~ ^~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift💯42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
self.task = self.session.dataTask(with: usedRequest)
~~~~~~~~~~~~ ^~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:103:24: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume'
self.task?.resume()
~~~~~~~~~~ ^~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:104:26: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
self.session.finishTasksAndInvalidate()
~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:72:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
} catch let error as NSError {
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:141:35: warning: conditional downcast from 'URLResponse?' (aka 'Optional') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
guard let response = resp as? HTTPURLResponse, let responseData = data else {
~~~~~^~~~~~~~~~~~~~~~~~~

/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:141:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
guard let response = resp as? HTTPURLResponse, let responseData = data else {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:150:36: warning: conditional downcast from 'URLResponse?' (aka 'Optional') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
if let response = resp as? HTTPURLResponse {
~~~~~^~~~~~~~~~~~~~~~~~~

/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:150:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
if let response = resp as? HTTPURLResponse {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:151:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
userInfo["Response-Headers"] = response.allHeaderFields
~~~~~~~~ ^~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:159:24: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
guard response.statusCode < 400 else {
~~~~~~~~ ^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:176:96: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
localizedDescription = OAuthSwiftHTTPRequest.descriptionForHTTPStatus(response.statusCode, responseString: String(data: responseData, encoding: OAuthSwiftDataEncoding)!)
~~~~~~~~ ^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:181:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
"Response-Headers": response.allHeaderFields,
~~~~~~~~ ^~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:188:46: error: type of expression is ambiguous without more context
if let urlString = response.url?.absoluteString {
~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:192:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
let error = NSError(domain: OAuthSwiftError.Domain, code: response.statusCode, userInfo: userInfo)
~~~~~~~~ ^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:21:65: error: cannot find type 'URLRequest' in scope
public init(data: Data, response: HTTPURLResponse, request: URLRequest?) {
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:217:18: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
task.cancel()
~~~~ ^~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:246:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: url)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:291:49: error: type of expression is ambiguous without more context
if let contentType = headers[kHTTPHeaderContentType], contentType.contains("application/json") {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:295:56: error: type of expression is ambiguous without more context
} else if let contentType = headers[kHTTPHeaderContentType], contentType.contains("multipart/form-data") {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:329:47: error: type of expression is ambiguous without more context
if let requestMethod = urlRequest.httpMethod {
~~~~~~~~~~~^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:341:30: error: cannot find 'URLRequest' in scope
var urlRequest = URLRequest(url: url)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:347:35: error: extra argument 'urlRequest' in call
self.init(urlRequest: urlRequest, parameters: parameters, paramsLocation: paramsLocation, dataEncoding: dataEncoding, sessionFactory: sessionFactory)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:347:23: error: missing argument for parameter 'url' in call
self.init(urlRequest: urlRequest, parameters: parameters, paramsLocation: paramsLocation, dataEncoding: dataEncoding, sessionFactory: sessionFactory)
^
url: <#URL#>,
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:340:16: note: 'init(url:httpMethod:httpBody:headers:timeoutInterval:httpShouldHandleCookies:parameters:paramsLocation:dataEncoding:sessionFactory:)' declared here
public init(url: URL, httpMethod: Method = .GET, httpBody: Data? = nil, headers: OAuthSwift.Headers = [:], timeoutInterval: TimeInterval = 60, httpShouldHandleCookies: Bool = false, parameters: OAuthSwift.Parameters, paramsLocation: ParamsLocation = .authorizationHeader, dataEncoding: String.Encoding = OAuthSwiftDataEncoding, sessionFactory: URLSessionFactory = .default) {
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:398:48: error: type of expression is ambiguous without more context
if let queryItems = urlComponents?.queryItems {
~~~~~~~~~~~~~~~^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:407:40: error: 'nil' requires a contextual type
urlComponents?.query = nil
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:451:16: error: type 'URLSession' (aka 'AnyObject') has no member 'init'
return URLSession(configuration: self.configuration, delegate: self.delegate, delegateQueue: self.queue)
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:12:2: error: Objective-C interoperability is disabled
@objc
~^~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:17:26: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public var response: HTTPURLResponse
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:19:25: error: cannot find type 'URLRequest' in scope
public var request: URLRequest?
^~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:21:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public init(data: Data, response: HTTPURLResponse, request: URLRequest?) {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftURLHandlerType.swift:21:2: error: Objective-C interoperability is disabled
@objc public protocol OAuthSwiftURLHandlerType {
~^~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:83:59: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
scanner.scanUpTo(keyValueSeparator, into: &key)
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:83:59: note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
scanner.scanUpTo(keyValueSeparator, into: &key)
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:87:58: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>'
scanner.scanUpTo(elementSeparator, into: &value)
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:87:58: note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal
scanner.scanUpTo(elementSeparator, into: &value)
^
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:140:23: error: cannot find 'CFStringConvertEncodingToIANACharSetName' in scope
let charset = CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.rawValue))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:140:64: error: cannot find 'CFStringConvertNSStringEncodingToEncoding' in scope
let charset = CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.rawValue))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:23:20: error: cannot find 'arc4random_uniform' in scope
let rand = arc4random_uniform(length)
^~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:34:9: error: cannot find 'SecRandomCopyBytes' in scope
_ = SecRandomCopyBytes(kSecRandomDefault, buffer.count, &buffer)
^~~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:34:28: error: cannot find 'kSecRandomDefault' in scope
_ = SecRandomCopyBytes(kSecRandomDefault, buffer.count, &buffer)
^~~~~~~~~~~~~~~~~
/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:56:21: error: cannot specialize non-generic type 'HMAC'
let sha = Array(HMAC.authenticationCode(for: buffer, using: SymmetricKey(size: .bits256)))
^ ~~~~~~~~

/www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:64:34: error: cannot infer contextual base in reference to member 'whitespaces'
.trimmingCharacters(in: .whitespaces)

Originally created by @underthestars-zhy on GitHub (Mar 12, 2022). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/695 ### Description: ### OAuth Provider? (Twitter, Github, ..): Onedrive ### OAuth Version: - [ ] Version 1 - [X] Version 2 ### OS (Please fill the version) : - [] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : - [X] Linux: centos 7.6 ### Installation method: - [ ] Carthage - [ ] CocoaPods - [X] Swift Package Manager - [ ] Manually ### Library version: - [X] head - [ ] v2.1.0 - [ ] v2.0.0 - [ ] v1.4.1 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [ ] 11.4 (Swift 5.2) - [ ] 11.x (Swift 5.1) - [ ] 10.x (Swift 5.0) - [X] 12 - [ ] objective c ### Bug /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:14:39: error: cannot find type 'NSExtensionContext' in scope fileprivate var extensionContext: NSExtensionContext ^~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:16:35: error: cannot find type 'NSExtensionContext' in scope public init(extensionContext: NSExtensionContext) { ^~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:20:6: error: Objective-C interoperability is disabled @objc open func handle(_ url: URL) { ~^~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/ExtensionContextURLHandler.swift:21:55: error: 'nil' requires a contextual type extensionContext.open(url, completionHandler: nil) ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/OAuthSwiftOpenURLExternally.swift:24:6: error: Objective-C interoperability is disabled @objc open func handle(_ url: URL) { ~^~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Handler/OAuthWebViewController.swift:39:36: error: cannot find type 'OAuthViewController' in scope open class OAuthWebViewController: OAuthViewController, OAuthSwiftURLHandlerType { ^~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/NSError+OAuthSwift.swift:62:63: error: type of expression is ambiguous without more context let errorCode = jsonDic["error"]?["code"] as? Int ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/NSError+OAuthSwift.swift:63:75: error: type of expression is ambiguous without more context let errorSubCode = jsonDic["error"]?["error_subcode"] as? Int ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:13:2: error: Objective-C interoperability is disabled @objc public protocol OAuthSwiftRequestHandle { ~^~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:436:56: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default' public var configuration = URLSessionConfiguration.default ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:439:31: error: cannot find type 'URLSessionDelegate' in scope public weak var delegate: URLSessionDelegate? ^~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:92:38: error: cannot find type 'URLRequest' in scope open func makeRequest(_ request: URLRequest) -> OAuthSwiftHTTPRequest { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:58:31: error: cannot find type 'URLRequest' in scope convenience init(request: URLRequest, paramsLocation: ParamsLocation = .authorizationHeader, sessionFactory: URLSessionFactory = .default) { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:93:54: error: extra argument 'request' in call let request = OAuthSwiftHTTPRequest(request: request, paramsLocation: self.paramsLocation, sessionFactory: self.sessionFactory) ^~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:93:45: error: missing argument for parameter 'url' in call let request = OAuthSwiftHTTPRequest(request: request, paramsLocation: self.paramsLocation, sessionFactory: self.sessionFactory) ^ url: <#URL#>, /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:54:17: note: 'init(url:method:parameters:paramsLocation:httpBody:headers:sessionFactory:)' declared here convenience init(url: URL, method: Method = .GET, parameters: OAuthSwift.Parameters = [:], paramsLocation: ParamsLocation = .authorizationHeader, httpBody: Data? = nil, headers: OAuthSwift.Headers = [:], sessionFactory: URLSessionFactory = .default) { ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:114:39: error: cannot find 'arc4random' in scope let boundary = "AS-boundary-\(arc4random())-\(arc4random())" ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftClient.swift:114:55: error: cannot find 'arc4random' in scope let boundary = "AS-boundary-\(arc4random())-\(arc4random())" ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:34:46: error: cannot find type 'URLRequest' in scope case requestError(error: Error, request: URLRequest) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:38:54: error: cannot find type 'URLRequest' in scope case authorizationPending(error: Error, request: URLRequest) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:40:42: error: cannot find type 'URLRequest' in scope case slowDown(error: Error, request: URLRequest) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:42:46: error: cannot find type 'URLRequest' in scope case accessDenied(error: Error, request: URLRequest) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:77:15: error: type '_ErrorCodeProtocol' has no member 'requestError' case .requestError: return Code.requestError ~^~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:78:15: error: type '_ErrorCodeProtocol' has no member 'authorizationPending' case .authorizationPending: return Code.authorizationPending ~^~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:79:15: error: type '_ErrorCodeProtocol' has no member 'slowDown' case .slowDown: return Code.slowDown ~^~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:80:15: error: type '_ErrorCodeProtocol' has no member 'accessDenied' case .accessDenied: return Code.accessDenied ~^~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:87:35: error: '_' can only appear in a pattern or on the left side of an assignment case .requestError(let e, _): return e ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:88:43: error: '_' can only appear in a pattern or on the left side of an assignment case .authorizationPending(let e, _): return e ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:89:31: error: '_' can only appear in a pattern or on the left side of an assignment case .slowDown(let e, _): return e ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:90:35: error: '_' can only appear in a pattern or on the left side of an assignment case .accessDenied(let e, _): return e ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:119:35: error: '_' can only appear in a pattern or on the left side of an assignment case .requestError(let e, _): return "requestError[\(e)]" ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:120:15: error: type '_ErrorCodeProtocol' has no member 'slowDown' case .slowDown : return "slowDown" ~^~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:121:15: error: type '_ErrorCodeProtocol' has no member 'accessDenied' case .accessDenied : return "accessDenied" ~^~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:122:15: error: type '_ErrorCodeProtocol' has no member 'authorizationPending' case .authorizationPending: return "authorizationPending" ~^~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:156:15: error: type '_ErrorCodeProtocol' has no member 'requestError' case .requestError(let e, let request): return ["error": e, "request": request] ~^~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:157:15: error: type '_ErrorCodeProtocol' has no member 'authorizationPending' case .authorizationPending(let e, let request): return ["error": e, "request": request] ~^~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:158:15: error: type '_ErrorCodeProtocol' has no member 'slowDown' case .slowDown(let e, let request): return ["error": e, "request": request] ~^~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftError.swift:159:15: error: type '_ErrorCodeProtocol' has no member 'accessDenied' case .accessDenied(let e, let request): return ["error": e, "request": request] ~^~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:42:26: error: cannot find type 'URLRequest' in scope private var request: URLRequest? ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:43:23: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. private var task: URLSessionTask? ^~~~~~~~~~~~~~ Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here public typealias URLSessionTask = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:44:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. private var session: URLSession! ^~~~~~~~~~ Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here public typealias URLSession = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:117:101: error: cannot find type 'URLRequest' in scope public static func completionHandler(completionHandler completion: CompletionHandler?, request: URLRequest, data: Data?, resp: URLResponse?, error: Error?) { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:117:132: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. public static func completionHandler(completionHandler completion: CompletionHandler?, request: URLRequest, data: Data?, resp: URLResponse?, error: Error?) { ^~~~~~~~~~~ Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here public typealias URLResponse = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:223:39: error: cannot find type 'URLRequest' in scope open func makeRequest() throws -> URLRequest { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:227:59: error: cannot find type 'URLRequest' in scope open class func makeRequest(config: Config) throws -> URLRequest { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:244:74: error: cannot find type 'URLRequest' in scope paramsLocation: ParamsLocation = .authorizationHeader) throws -> URLRequest { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:267:74: error: cannot find type 'URLRequest' in scope paramsLocation: ParamsLocation = .authorizationHeader) throws -> URLRequest { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:263:24: error: cannot find type 'URLRequest' in scope request: inout URLRequest, ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:317:32: error: cannot find type 'URLRequest' in scope public var urlRequest: URLRequest ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:350:33: error: cannot find type 'URLRequest' in scope public init(urlRequest: URLRequest, parameters: OAuthSwift.Parameters = [:], paramsLocation: ParamsLocation = .authorizationHeader, dataEncoding: String.Encoding = OAuthSwiftDataEncoding, sessionFactory: URLSessionFactory = .default) { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:450:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. func build() -> URLSession { ^~~~~~~~~~ Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here public typealias URLSession = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:59:46: error: extra argument 'urlRequest' in call self.init(config: Config(urlRequest: request, paramsLocation: paramsLocation, sessionFactory: sessionFactory)) ^~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:59:33: error: missing arguments for parameters 'url', 'parameters' in call self.init(config: Config(urlRequest: request, paramsLocation: paramsLocation, sessionFactory: sessionFactory)) ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:340:16: note: 'init(url:httpMethod:httpBody:headers:timeoutInterval:httpShouldHandleCookies:parameters:paramsLocation:dataEncoding:sessionFactory:)' declared here public init(url: URL, httpMethod: Method = .GET, httpBody: Data? = nil, headers: OAuthSwift.Headers = [:], timeoutInterval: TimeInterval = 60, httpShouldHandleCookies: Bool = false, parameters: OAuthSwift.Parameters, paramsLocation: ParamsLocation = .authorizationHeader, dataEncoding: String.Encoding = OAuthSwiftDataEncoding, sessionFactory: URLSessionFactory = .default) { ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:74:28: error: 'nil' requires a contextual type self.request = nil ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:91:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. let completionHandler: (Data?, URLResponse?, Error?) -> Void = { data, resp, error in ^~~~~~~~~~~ Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here public typealias URLResponse = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:98:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask' self.task = self.session.dataTask(with: usedRequest, completionHandler: completionHandler) ~~~~~~~~~~~~ ^~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:100:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask' self.task = self.session.dataTask(with: usedRequest) ~~~~~~~~~~~~ ^~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:103:24: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'resume' self.task?.resume() ~~~~~~~~~~ ^~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:104:26: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate' self.session.finishTasksAndInvalidate() ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:72:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block } catch let error as NSError { ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:141:35: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing guard let response = resp as? HTTPURLResponse, let responseData = data else { ~~~~~^~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:141:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. guard let response = resp as? HTTPURLResponse, let responseData = data else { ^~~~~~~~~~~~~~~ Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here public typealias HTTPURLResponse = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:150:36: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing if let response = resp as? HTTPURLResponse { ~~~~~^~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:150:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. if let response = resp as? HTTPURLResponse { ^~~~~~~~~~~~~~~ Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here public typealias HTTPURLResponse = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:151:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields' userInfo["Response-Headers"] = response.allHeaderFields ~~~~~~~~ ^~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:159:24: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode' guard response.statusCode < 400 else { ~~~~~~~~ ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:176:96: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode' localizedDescription = OAuthSwiftHTTPRequest.descriptionForHTTPStatus(response.statusCode, responseString: String(data: responseData, encoding: OAuthSwiftDataEncoding)!) ~~~~~~~~ ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:181:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields' "Response-Headers": response.allHeaderFields, ~~~~~~~~ ^~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:188:46: error: type of expression is ambiguous without more context if let urlString = response.url?.absoluteString { ~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:192:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode' let error = NSError(domain: OAuthSwiftError.Domain, code: response.statusCode, userInfo: userInfo) ~~~~~~~~ ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:21:65: error: cannot find type 'URLRequest' in scope public init(data: Data, response: HTTPURLResponse, request: URLRequest?) { ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:217:18: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel' task.cancel() ~~~~ ^~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:246:23: error: cannot find 'URLRequest' in scope var request = URLRequest(url: url) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:291:49: error: type of expression is ambiguous without more context if let contentType = headers[kHTTPHeaderContentType], contentType.contains("application/json") { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:295:56: error: type of expression is ambiguous without more context } else if let contentType = headers[kHTTPHeaderContentType], contentType.contains("multipart/form-data") { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:329:47: error: type of expression is ambiguous without more context if let requestMethod = urlRequest.httpMethod { ~~~~~~~~~~~^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:341:30: error: cannot find 'URLRequest' in scope var urlRequest = URLRequest(url: url) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:347:35: error: extra argument 'urlRequest' in call self.init(urlRequest: urlRequest, parameters: parameters, paramsLocation: paramsLocation, dataEncoding: dataEncoding, sessionFactory: sessionFactory) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:347:23: error: missing argument for parameter 'url' in call self.init(urlRequest: urlRequest, parameters: parameters, paramsLocation: paramsLocation, dataEncoding: dataEncoding, sessionFactory: sessionFactory) ^ url: <#URL#>, /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:340:16: note: 'init(url:httpMethod:httpBody:headers:timeoutInterval:httpShouldHandleCookies:parameters:paramsLocation:dataEncoding:sessionFactory:)' declared here public init(url: URL, httpMethod: Method = .GET, httpBody: Data? = nil, headers: OAuthSwift.Headers = [:], timeoutInterval: TimeInterval = 60, httpShouldHandleCookies: Bool = false, parameters: OAuthSwift.Parameters, paramsLocation: ParamsLocation = .authorizationHeader, dataEncoding: String.Encoding = OAuthSwiftDataEncoding, sessionFactory: URLSessionFactory = .default) { ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:398:48: error: type of expression is ambiguous without more context if let queryItems = urlComponents?.queryItems { ~~~~~~~~~~~~~~~^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:407:40: error: 'nil' requires a contextual type urlComponents?.query = nil ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftHTTPRequest.swift:451:16: error: type 'URLSession' (aka 'AnyObject') has no member 'init' return URLSession(configuration: self.configuration, delegate: self.delegate, delegateQueue: self.queue) ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:12:2: error: Objective-C interoperability is disabled @objc ~^~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:17:26: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. public var response: HTTPURLResponse ^~~~~~~~~~~~~~~ Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here public typealias HTTPURLResponse = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:19:25: error: cannot find type 'URLRequest' in scope public var request: URLRequest? ^~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftResponse.swift:21:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it. public init(data: Data, response: HTTPURLResponse, request: URLRequest?) { ^~~~~~~~~~~~~~~ Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here public typealias HTTPURLResponse = AnyObject ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/OAuthSwiftURLHandlerType.swift:21:2: error: Objective-C interoperability is disabled @objc public protocol OAuthSwiftURLHandlerType { ~^~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:83:59: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>' scanner.scanUpTo(keyValueSeparator, into: &key) ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:83:59: note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal scanner.scanUpTo(keyValueSeparator, into: &key) ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:87:58: error: cannot convert value of type 'UnsafeMutablePointer<NSString?>' to expected argument type 'UnsafeMutablePointer<String?>' scanner.scanUpTo(elementSeparator, into: &value) ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:87:58: note: arguments to generic parameter 'Pointee' ('NSString?' and 'String?') are expected to be equal scanner.scanUpTo(elementSeparator, into: &value) ^ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:140:23: error: cannot find 'CFStringConvertEncodingToIANACharSetName' in scope let charset = CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.rawValue)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/String+OAuthSwift.swift:140:64: error: cannot find 'CFStringConvertNSStringEncodingToEncoding' in scope let charset = CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.rawValue)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:23:20: error: cannot find 'arc4random_uniform' in scope let rand = arc4random_uniform(length) ^~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:34:9: error: cannot find 'SecRandomCopyBytes' in scope _ = SecRandomCopyBytes(kSecRandomDefault, buffer.count, &buffer) ^~~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:34:28: error: cannot find 'kSecRandomDefault' in scope _ = SecRandomCopyBytes(kSecRandomDefault, buffer.count, &buffer) ^~~~~~~~~~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:56:21: error: cannot specialize non-generic type 'HMAC' let sha = Array(HMAC<SHA256>.authenticationCode(for: buffer, using: SymmetricKey(size: .bits256))) ^ ~~~~~~~~ /www/wwwroot/EndLess-Api/.build/checkouts/OAuthSwift/Sources/Utils.swift:64:34: error: cannot infer contextual base in reference to member 'whitespaces' .trimmingCharacters(in: .whitespaces)
kerem closed this issue 2026-03-03 16:48:47 +03:00
Author
Owner

@phimage commented on GitHub (Mar 12, 2022):

Hi, please learn how to use markdown for errors and codes, it's not readable without that

then we do not support linux, it is mentioned nowhere
pull request are welcome
(the issue is how to present a web view to handle user login, is it easy to integrate webkit or open a browser and come back to your process using scheme?)

<!-- gh-comment-id:1065836135 --> @phimage commented on GitHub (Mar 12, 2022): Hi, please learn how to use markdown for errors and codes, it's not readable without that then we do not support linux, it is mentioned nowhere pull request are welcome (the issue is how to present a web view to handle user login, is it easy to integrate webkit or open a browser and come back to your process using scheme?)
Author
Owner

@underthestars-zhy commented on GitHub (Mar 12, 2022):

But the package seems like it support Linux

#if os(Linux)
package.dependencies.append(.package(url: "https://github.com/apple/swift-crypto.git", from: "1.0.0"))
package.targets[0].dependencies.append("Crypto")
#endif
<!-- gh-comment-id:1065836441 --> @underthestars-zhy commented on GitHub (Mar 12, 2022): But the package seems like it support Linux ```swift #if os(Linux) package.dependencies.append(.package(url: "https://github.com/apple/swift-crypto.git", from: "1.0.0")) package.targets[0].dependencies.append("Crypto") #endif ```
Author
Owner

@phimage commented on GitHub (Mar 13, 2022):

Just adding a dependency missing from linux doesn't means its compatible (no target defined in package )

(there is no doc, no ci to build and test etc...)

and as I say even if it compile you could do nothing without specific linux code to handle web login

<!-- gh-comment-id:1066172922 --> @phimage commented on GitHub (Mar 13, 2022): Just adding a dependency missing from linux doesn't means its compatible (no target defined in package ) (there is no doc, no ci to build and test etc...) and as I say even if it compile you could do nothing without specific linux code to handle web login
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#452
No description provided.