forked from organicmaps/organicmaps
[ios] Country code on non-sim devices bug fix
This commit is contained in:
parent
5dedcb0327
commit
bcb67ade63
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ NSString * const AppFeatureBannerAd = @"BannerAd";
|
|||
{
|
||||
CTTelephonyNetworkInfo * networkInfo = [[CTTelephonyNetworkInfo alloc] init];
|
||||
CTCarrier * carrier = networkInfo.subscriberCellularProvider;
|
||||
if (carrier.isoCountryCode) // if device can access sim card info
|
||||
if ([carrier.isoCountryCode length]) // if device can access sim card info
|
||||
_countryCode = [carrier.isoCountryCode uppercaseString];
|
||||
else // else, getting system country code
|
||||
_countryCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
|
||||
|
|
Loading…
Add table
Reference in a new issue