geolocation - Determine iPhone user's country -


I need to figure out which country the user is in for an iPhone application. I probably have to turn on Location Services and some kind of reverse geocode has to be done. I do not really want to use a third party web service, so are there any other suggestions for determining the country from location services?

Initially, I just have to check whether the user is inside or not, but it can change to add more countries in the future. I understand that the placement can not always be determined or the user may have turn off location services. In fact, I have to know that the user has come to close a special feature as being inside the US.

EDIT: Upon further reading, it seems that MKRW is going to be a geocode, except that I do not want to display any map in my app, which means that I have permission to use it is not.

Another trick you can try is checking the carrier:

  #import & lt; Core Telephony / CT Telephonon Network Info & Gt; #important & lt; Core Telephony / CT Crarian H & gt; CT TelephonyNetworkInfo * NetInfo = [[CT Telephony Network Infoc Lock] Init]; CTCarrier * Carrier = [NetInfo Client Cellular Provider]; NSString * mcc = [carrier mobileCountryCode];  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -