Rohit suvagiya
Rohit suvagiya

Reputation: 1015

How can I get city name without current location(lat-long) in iOS?

I have a GPS class which returns lat, long. And I'm trying to get the city name or address from that coordinates with geocoder. It works well.

But, is it possible to get city name or anything without geocoder or (lat-long)?

Upvotes: 6

Views: 1285

Answers (1)

Rohit suvagiya
Rohit suvagiya

Reputation: 1015

I have completed task use this api:

http://ip-api.com/json

This will give you your current location from your IP address very simply just call this JSON and you got whatever you required.

Upvotes: 4

Related Questions