Is there any way for me to detect whether or not a user is in the US without asking for their location? For example, when I go to Fandango on my computer it knows which county and state I’m in just based on my WiFi.
If I have a device, perhaps an iPod Touch, that doesn’t have GPS, and I wanted to verify it is in the United States, and they are connected to WiFi… or if I had an iPhone and it was connected with 3G and I wanted to make sure the users were in the US, is there a way I can check that information without the little alert view “__ would like to use your current location”? I don’t need exact coordinates, I just need to confirm that these users are in the USA (including Hawaii and Alaska)… locale?
I would first try to check the carrier’s Mobile Country Code. It will tell you the numeric mobile country code for the user’s cellular service provider and cannot be changed by the user unless they switch to a service provider in a different country.
This of course will not work with devices that are not connected to a mobile carrier (iPod Touch, some iPads, ect). Therefor, as a fall back, I would use or create my own IP geolocation API. You can get a free database that is 99.5% accurate on a country level. This will work great to detect the country of a device that doesn’t have a mobile provider.