diff --git a/.eslintrc.js b/.eslintrc.js index 8548429f6..da5d60373 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { "settings": { "import/resolver": { "node": { - "extensions": [".js", ".ios.js", ".android.js"] + "extensions": [".js", ".ios.js", ".android.js", ".native.js"] } } }, diff --git a/app/index.js b/app/index.js index 96ceae5fe..890536caf 100644 --- a/app/index.js +++ b/app/index.js @@ -3,7 +3,6 @@ import { createAppContainer, createSwitchNavigator } from 'react-navigation'; import { createStackNavigator } from 'react-navigation-stack'; import { createDrawerNavigator } from 'react-navigation-drawer'; import { Provider } from 'react-redux'; -import { useScreens } from 'react-native-screens'; // eslint-disable-line import/no-unresolved import { Linking } from 'react-native'; import PropTypes from 'prop-types'; @@ -19,8 +18,12 @@ import { defaultHeader, onNavigationStateChange } from './utils/navigation'; import { loggerConfig, analytics } from './utils/log'; import Toast from './containers/Toast'; import RocketChat from './lib/rocketchat'; +import { isIOS } from './utils/deviceInfo'; -useScreens(); +if (isIOS) { + const RNScreens = require('react-native-screens'); + RNScreens.useScreens(); +} const parseDeepLinking = (url) => { if (url) {