I want to get the name of a business given its latitude and longitude. There are other APIs that do this like Google Places, but I'd rather not have additional dependencies in my app if I can help it. Is there any way to do this via CoreLocation in Swift? I know you can get an address "name" from a latitude and longitude using this:
let geocoder = CLGeocoder()
geocoder.reverseGeocodeLocation(location) { (placemarks, error) in
placemarks?.first?.name
}
But this only gives me the street number, not the actual name of the business like "Costco" or whatever it's really called.
You can use Areas of Interest information from CLPlacemark, as in documentation:
Check it here: https://developer.apple.com/reference/corelocation/clplacemark/1423673-areasofinterest
And here for all info available: https://developer.apple.com/reference/corelocation/clplacemark