I am using Google PlaceAutoComplete method to get suggestions of the Addess that is entered in textField.
func placeAutocomplete(text:String) {
let placesClient = GMSPlacesClient()
let filter = GMSAutocompleteFilter()
filter.type = .Address
placesClient.autocompleteQuery("New Delhi", bounds: nil, filter: nil) { (results, error) in
guard error == nil else {
print("Autocomplete error \(error)")
return
}
self.addressArray.removeAll()
for result in results! {
self.addressArray.append(result.attributedFullText.string)
print("Result \(result.attributedFullText.string) with placeID \(result.placeID)")
}
}
}
When i call this method. It crashes, say the Following error.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary boolValue]: unrecognized selector sent to instance 0x7fe338f01e40'
I have tried to found using exception breakpoint but doesn't work. Can any have idea, where i am wrong?
I have resolved the issue by correcting in the plist for "allow arbitrary loads" in App Transport security Settings. I was typed it true but its type was set string instead for Boolean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With