Get device location (only country) in iOS
NSString *countryCode = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]; will get you an identifier like e.g. “US” (United States), “ES” (Spain), etc. In Swift 3: let countryCode = NSLocale.current.regionCode In Swift 2.2: let countryCode = NSLocale.currentLocale().objectForKey(NSLocaleCountryCode) as String Compared to a solution based on CLLocationManager this approach has pros and cons. The primary con is that it … Read more