CRMClient.swift file, line #144, after Xcode translated the code to latest swift version, has an issue.
-
"WWW-Authenticate" has to be replaced with "Www-Authenticate".
-
also had to access the response headers dictionary in a different way, this is what has worked for me:
let httpResponse = response as! HTTPURLResponse;
let authenticationHeaderDict = httpResponse.allHeaderFields as Dictionary
let authenticationHeaderValue = authenticationHeaderDict[AnyHashable("Www-Authenticate")]
var authenticationHeader = authenticationHeaderValue as! NSString
CRMClient.swift file, line #144, after Xcode translated the code to latest swift version, has an issue.
"WWW-Authenticate" has to be replaced with "Www-Authenticate".
also had to access the response headers dictionary in a different way, this is what has worked for me: