Amal El-galant Amal El-galant -4 years ago 133
Swift Question

Google Maps Autocomplete error Swift 2.2

this line gives me error "use of unresolved identifier 'URL'"

let url = URL(string: urlpath!)

Answer Source

if you are swift ver is 3 then use

let url = URL(string: urlpath!)

else it is lesser than swift3 then Use NSURL instead of URL

let url = NSURL(string: urlpath!)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download