i have found some problem with string url encoding
let url:String! = self.oauth2Settings.authorizeURL + "?response_type=code&client_id=" + self.oauth2Settings.clientID + "&redirect_uri=" + self.oauth2Settings.redirectURL.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlHostAllowed)! + "&scope=" + self.oauth2Settings.scope + "&state=" + expectedState
let urlRequest : NSURLRequest = NSURLRequest(url: NSURL(string: url)! as URL)
self.webView!.loadRequest(urlRequest as URLRequest)
converting string to NSURL will raise nil error, i have solution to add
` let urlRequest : NSURLRequest = NSURLRequest(url: NSURL(string: url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)! as URL)`
thank you very much
i have found some problem with string url encoding
converting string to NSURL will raise nil error, i have solution to add
thank you very much