Convert String to NSURL is return nil in swift 3/4 – Solution

4
May,2018

0

let url : NSString = “url string here” let urlStr : NSString = url.addingPercentEscapes(using: String.Encoding.utf8.rawValue)! as NSString let actualURL : NSURL = NSURL(string: urlStr as String)! print(actualURL)