The usual way would be to get the country code of the operator from the main telephony interface, and then compare this with the country code with reverse geocoding of the location.
Advantages: works with VPN and when the user disconnected data when roaming. Disadvantages: does not work without space.
I donβt have a code that is not related to copyright for you, but the key you need in the place you need for the country code is @CountryCode, Geocoding will look something like this: -
CLGeocoder* geocoder = [[CLGeocoder alloc] init]; [geocoder reverseGeocodeLocation:location completionHandler: ^(NSArray* placemarks){}]
The country code for the provider will be
NSString* homeCountry = [netInfo.subscriberCellularProvider isoCountryCode];
Hope this helps
source share