CLGeocoder geocodeAddressString only returns one result

Why does the geocodeAddressString method of CLGeocode always just return one result? For example, in the U.S. there are many cities named "Springfield". But if I pass that string to this method, I only get one CLPlacemark which represent the city in the state of "Illinois".

Is there another method I can call to get multiple matches?

I found the solution is to use MKLocalSearchCompleter. You can see my example here: WeatherKitDemo/LocationViewModel.swift at main · mvolkmann/WeatherKitDemo · GitHub.

1 Like