Решено:
`
let transform = "Any-Hex/Java"
let theCopy = argString.mutableCopy() as! NSMutableString
CFStringTransform( theCopy, nil, transform as NSString, true)
let encodedURLString = theCopy.addingPercentEncoding( withAllowedCharacters: .urlQueryAllowed)
let urlPath: String = encodedURLString!
let url: NSURL = NSURL( string: urlPath)!
`
Более простой метод был бы лучше.