Get user country

I just wanted to know how to find out the current country of the user using Xcode (iPhone Dev SDK).

+3
source share
1 answer

If you want to get a user country, you can do two things. The easiest way is to remove it from the localization settings.

NSLocale *locale = [NSLocale currentLocale];
NSString *country = [locale displayNameForKey:NSLocaleIdentifier value:[locale localeIdentifier]];

(, , ). , CoreLocation, , , . CoreLocation Framework. .

+12

All Articles