I have the following string...
NSString *googleSearchString = @\"http://www.google.com/search?q=lyrics+%22Tænder+På+Dig%22+%22Jakob+Sveistrup%22\"; >
NSString *googleSearchString = @\"http://www.google.com/search?q=lyrics+%22Tænder+På+Dig%22+%22Jakob+Sveistrup%22\";
Use this for SWIFT 4:
let url = myURLString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) let myURL = URL(string: url)