Search code examples
react-nativeiphone-x

how to update react-native project to adapt iPhone x


I got an old react-native project some day before, then updated the react-native to 0.55.4, but my project still doesn't adapt the iPhone X.

Need some help please.

"dependencies": { "react": "16.2.0", "react-native": "^0.55.4", } enter image description here


Solution

  • Do you use the new component provided in React Native 0.50.1 to deal with these case "SaveAreaView" : https://facebook.github.io/react-native/docs/safeareaview.html ?

    There is an article in Medium which show some screen's rendering alone or coupled with React Navigation https://medium.com/react-native-training/react-native-iphonex-92ff511282af

    If you use React Navigation, there was a similar issue reported on their github https://github.com/wix/react-native-navigation/issues/2113 The problem was about a wrong sized splash screen.

    Hope this helps !