The React Native Settings API appears to be broken in Expo.
I tested by creating new a project using react-native init. The Settings API works as expected. But when I create a new project using expo init, I get the following error:
null is not an object (evaluating 'this._settings[key]')
- node_modules/react-native/Libraries/Settings/Settings.ios.js:24:26 in get
* App.js:11:35 in onPress
- node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js:235:45 in touchableHandlePress
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:878:34 in _performSideEffectsForTransition
- ... 21 more stack frames from framework internals
Currently we don’t support Settings feature due to safety reasons.
There is no possibility to access NSUserDefault as long as your app is not detached. If you detach your app you will be able to modify a Podfile. As a result, you will be able to use Settings feature.