Question

Ipod uses wifi to get location. My question is can we create a custom wifi hotspot and do some hack to make ipod believe that its location is somewhere we want it to be? This is very critical as in my project I have to show items based on locations in US but I am living in India. So is there any method by which I can spoof location In US?

Was it helpful?

Solution

You can set a custom location to be simulated in your Project scheme. This simulation will be then "faked" both for your Simulator and when you run straight from Xcode on your device.

Project -> Edit scheme -> enable location, and choose from the pre-defined list or add your own custom .gpx file

OTHER TIPS

Geolocation without GPS is done in two ways:

  1. Apple has it's own database of WiFi networks and their locations. If you set up a new WiFi hotspot and connect to it, Apple most likely won't be able to take a location from it alone, as they won't know about it yet.
  2. Your external IP address can be traced to the country and sometimes city that you live in. This can be spoofed using a proxy server.

Are you trying to spoof your location to a web server or using the geo-location API? The correct approach will depend on what you are trying to spoof.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top