Closed dlpigpen closed 5 years ago
I'm having the same issue, did you manage to figure out what the issue was?
Hey there, sorry about that! The ReadMe is just showing an example of what you should do, queryDict()
is an extension I found online awhile ago to parse the URL. You can use the code below for it, or you can do your own parsing. As long as you can get the value of the code
parameter.
func queryDict() -> [String: Any] {
var info: [String: Any] = [String: Any]()
if let queryString = self.query{
for parameter in queryString.components(separatedBy: "&"){
let parts = parameter.components(separatedBy: "=")
if parts.count > 1 {
let key = parts[0].removingPercentEncoding
let value = parts[1].removingPercentEncoding
if key != nil && value != nil{
info[key!] = value
}
}
}
}
return info
}
}
I copied and pasted following this code:
However the compiler said there is no function name queryDic in url string variable.