Here’s a library for those times when you don’t need a precise user location, and would rather not ask the user for permission called FCCurrentLocationGeocoder from Fabio Caccamo.
FCCurentLocationLoader uses a free GeoIP service (you can download and use the database yourself) in order to get the user’s location using IP address.
view source