The other posters are correct, one great way to check is to verify if the device is jailbroken.
But, even if the device isn't jailbroken, it is still possible to fake the GPS location with a nearby GPS transmitter. So let's assume (although it is highly unlikely), that your user has this.
Technically, it is possible to detect if the GPS location is fake or not. However, your ability to do so is dependent on if the person faked other information as well such as nearby Wifi networks, or their external IP (such as using a VPN).
Reference: GPS Jamming Devices
Method A - Wifi
You can detect the wireless networks nearby and then lookup their locations and compare that to the one reported by your GPS. There are a couple of issues however.
Keep In Mind
- You must maintain network access to the internet.
- You must use private APIs to do this which are not approved for usage
by apps within the AppStore so you would never be able to publish it
there.
- Wifi must be enabled on the device and your app doesn't have any control to enable or disable it.
- The GPS location of the Wifi hotspot may not be accurate, but is often more accurate than that obtained from a device's internet IP such as in method B.
References:
Method B - Your device IP
You can connect to an online service which returns your location information based on your IP. You can then compare this to the GPS location which you were provided.
This will get through the app store review process, however...
Keep In Mind
- You must maintain network access to the internet.
- Your device IP maybe through a VPN which may report a location other than that which the device actually exist in.
- The GPS location information for the device's internet IP may not be accurate.
- You can't rely on your device's current network IP, you must query it from an internet source. This is because your device may exist behind a firewall, gateway, or other network barrier.
- Your device IP location will NOT be very accurate, you could confirm a city/state in most cases, but any finer detail isn't likely to be accurate.
References: