Problem with expo-localization

Please provide the following:

  1. SDK Version: 35.0.0
  2. iOS

i have problem with expo-localization on android is normally worked, but on my iOS emulator i getting error (viz. screen).

import * as Localization from 'expo-localization';

function getDeviceCountry() {
  let country = "US";
  console.log(Localization.locale);
  return country.toLowerCase();
}
1 Like

I’m getting the same error after upgrading to SDK 35. The error occurs only on simulator, it’s fine on the actual iOS device

The error occurs just after importing the package

Hi

The example from the documentation works for me on both an iOS device and an Android device. Does the example work for you? If not, what SDK did you upgrade from and did you install expo-localization? Is this perhaps related to the following breaking change mentioned in the SDK 35 release notes?

Localization : replaced the country constants with region . This is now only available on iOS and Web. (Related PR.)

I have updated the module to 7.0.0

The error occurs just after the import with no code at all

import * as Localization from 'expo-localization';

The error occurs only on the iOS simulator. It works on real device

1 Like

My app is at SDK v33. But I found this issue today since I rarely use iOS simulator.
Today I upgrade xcode to v11 and expo-cli to v3.1.2. Then tried to run my app on iOS simulator and found that this error happens. This error doesn’t happen if I run my app on expo client (v2.13.0.107059)

It is likely that this error is not related to specific expo SDK version. i doubt iOS version. iOS simulator’s iOS version is 13.0, whereas my iPhone X is 13.1.1, and my iPhone 6S is 12.3.1. Possibly this error happens only at 13.0 and related bug might be fixed at 13.1.1. Just my guess.

I am also experiencing the same problem here…

It looks like this might be related to iOS 13. Have a look at the following issues: